vcl button: Avoid a potential crash.
Change-Id: I09d0777ef51045054b8e3bc88aba9fb025e6f9ff
This commit is contained in:
@@ -2149,6 +2149,8 @@ Image VclBuilder::getCommandImage(const OUString& rCommand, bool bLarge,
|
||||
uno::Reference<frame::XModel> xModel(xController->getModel());
|
||||
|
||||
uno::Reference<ui::XUIConfigurationManagerSupplier> xSupplier(xModel, uno::UNO_QUERY);
|
||||
if (xSupplier.is())
|
||||
{
|
||||
uno::Reference<ui::XUIConfigurationManager> xDocUICfgMgr(xSupplier->getUIConfigurationManager(), uno::UNO_QUERY);
|
||||
uno::Reference<ui::XImageManager> xDocImgMgr(xDocUICfgMgr->getImageManager(), uno::UNO_QUERY);
|
||||
|
||||
@@ -2163,6 +2165,7 @@ Image VclBuilder::getCommandImage(const OUString& rCommand, bool bLarge,
|
||||
if (!!aImage)
|
||||
return aImage;
|
||||
}
|
||||
}
|
||||
catch (uno::Exception&)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user