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>
This commit is contained in:
Caolán McNamara 2022-12-21 14:10:10 +00:00
parent c73354b9f6
commit cb3108f860

View file

@ -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)