vcl button: Avoid a potential crash.

Change-Id: I09d0777ef51045054b8e3bc88aba9fb025e6f9ff
This commit is contained in:
Jan Holesovsky
2014-10-21 14:26:05 +02:00
parent 6e1c661823
commit 40043080bc

View File

@@ -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&)
{
}