diff options
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d8d217d571ae..043bc769450e 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -6413,6 +6413,10 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand) aTree.put("commandName", pCommand); uno::Reference<css::style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(pDocument->mxComponent, uno::UNO_QUERY); const uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies(); + if (!xStyleFamilies.is()) + { + return nullptr; + } const uno::Sequence<OUString> aStyleFamilies = xStyleFamilies->getElementNames(); static constexpr OUString aWriterStyles[] = |