summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-13 19:43:19 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-13 22:11:37 +0200
commit22909e7e94c542698f8a1c13151f67fbf2d0073a (patch)
tree1660aa6d62c0e57293ef28f2861125e0a11f8624 /desktop/source
parent72922587b9f8755bd06ea1a50a0387cb072f17dc (diff)
cid#1610240 Unchecked dynamic_cast
Change-Id: Iee9088344bb3319b751bc3c611ad0ab5e42374b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170434 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/lib/init.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5a85758039ff..2769c47bf9b0 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3177,6 +3177,8 @@ static char* lo_extractDocumentStructureRequest(LibreOfficeKit* /*pThis*/, const
if (xComp.is())
{
ITiledRenderable* pDoc = dynamic_cast<ITiledRenderable*>(xComp.get());
+ if (!pDoc)
+ return nullptr;
auto pBaseModel = dynamic_cast<SfxBaseModel*>(xComp.get());
if (!pBaseModel)