From b1cfdb7bee4f7af97af54e6abbc5d04aed4ba082 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 11 Mar 2019 11:06:57 +0200 Subject: new loplugin:unoquery look for places we are doing code like: Reference(model, css::uno::UNO_QUERY)->getAsProperty() which might result in a SIGSEGV is the query fails Change-Id: I5cbdbc9e64bd0bed588297c512bf60cbacb9442e Reviewed-on: https://gerrit.libreoffice.org/69044 Tested-by: Jenkins Reviewed-by: Noel Grandin --- reportdesign/source/core/api/ReportEngineJFree.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'reportdesign') diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx index 8b5f67f2968c..3c712d8f1878 100644 --- a/reportdesign/source/core/api/ReportEngineJFree.cxx +++ b/reportdesign/source/core/api/ReportEngineJFree.cxx @@ -277,7 +277,7 @@ uno::Reference< frame::XModel > OReportEngineJFree::createDocumentAlive( const u // if there is no frame given, find the right xFrameLoad.set( frame::Desktop::create(m_xContext), uno::UNO_QUERY); sal_Int32 const nFrameSearchFlag = frame::FrameSearchFlag::TASKS | frame::FrameSearchFlag::CREATE; - uno::Reference< frame::XFrame> xFrame = uno::Reference< frame::XFrame>(xFrameLoad,uno::UNO_QUERY)->findFrame("_blank",nFrameSearchFlag); + uno::Reference< frame::XFrame> xFrame = uno::Reference< frame::XFrame>(xFrameLoad,uno::UNO_QUERY_THROW)->findFrame("_blank",nFrameSearchFlag); xFrameLoad.set( xFrame,uno::UNO_QUERY); } -- cgit