summaryrefslogtreecommitdiff
path: root/extensions/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-12-21 14:10:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-12-21 23:59:19 +0000
commitcb3108f860065928552a86cf8acc4b3a95718ecf (patch)
treead96884cc7522be0abbe4d502b4e2fc5e76821c6 /extensions/source
parentc73354b9f66ba436d933cc6558a38470e00c6ba8 (diff)
cid#1517812 Dereference null return value
Change-Id: Ia9cf34f03a18e499f83e495c0f3714b7476c3973 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144687 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'extensions/source')
-rw-r--r--extensions/source/propctrlr/handlerhelper.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx
index 55ffb9182f48..dfa83ff0c6e8 100644
--- a/extensions/source/propctrlr/handlerhelper.cxx
+++ b/extensions/source/propctrlr/handlerhelper.cxx
@@ -292,9 +292,10 @@ namespace pcr
std::unique_ptr<weld::Builder> PropertyHandlerHelper::makeBuilder(const OUString& rUIFile, const Reference<XComponentContext>& rContext)
{
Reference<XWindow> xWindow(rContext->getValueByName("BuilderParent"), UNO_QUERY_THROW);
- weld::TransportAsXWindow* rTunnel
+ weld::TransportAsXWindow* pTunnel
= comphelper::getFromUnoTunnel<weld::TransportAsXWindow>(xWindow);
- return Application::CreateBuilder(rTunnel->getWidget(), rUIFile);
+ assert(pTunnel && "must exist");
+ return Application::CreateBuilder(pTunnel->getWidget(), rUIFile);
}
void PropertyHandlerHelper::setBuilderParent(const css::uno::Reference<css::uno::XComponentContext>& rContext, weld::Widget* pParent)