diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index ec18025b9b01..553055daa706 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -1501,9 +1501,11 @@ void GalleryBrowser1::FillThemeEntries() sal_uInt32 nObjectCount = pTheme->GetObjectCount(); for (size_t nObject = 0; nObject < nObjectCount; ++nObject) { - std::unique_ptr<SgaObject> xSgaObject = pTheme->AcquireObject(nObject); - OUString aTitle = GetItemText(*xSgaObject, GalleryItemFlags::Title); - maAllThemeEntries.push_back(ThemeEntry(aThemeName, aTitle, nObject)); + if (std::unique_ptr<SgaObject> xSgaObject = pTheme->AcquireObject(nObject)) + { + OUString aTitle = GetItemText(*xSgaObject, GalleryItemFlags::Title); + maAllThemeEntries.push_back(ThemeEntry(aThemeName, aTitle, nObject)); + } } mpGallery->ReleaseTheme(pTheme, maLocalListner); } |