diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-06-15 10:27:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-06-15 12:44:09 +0100 |
commit | d712a4f8225c872451ec3f76e0909825489abaf0 (patch) | |
tree | db913821dc53257a0596c5c638c80578871d1a1d /vcl | |
parent | 06bf933056642a3353619d9c174f1e0cb7838c8d (diff) |
continue if theme cannot be determined
Change-Id: Ia5b6e77b66357dd74c5163472e07a5c31166e8d2
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/bitmapex.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index a2034944ae88..62c571ebe855 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -96,9 +96,20 @@ BitmapEx::BitmapEx( const OUString& rIconName ) void BitmapEx::loadFromIconTheme( const OUString& rIconName ) { - OUString aIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme(); + bool bSuccess; + OUString aIconTheme; - if (!ImageTree::get().loadImage(rIconName, aIconTheme, *this, true)) + try + { + aIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme(); + bSuccess = ImageTree::get().loadImage(rIconName, aIconTheme, *this, true); + } + catch (...) + { + bSuccess = false; + } + + if (!bSuccess) { #ifdef DBG_UTIL OStringBuffer aErrorStr( |