diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-08-05 10:52:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-08-05 13:39:46 +0200 |
commit | 6164600ec1e60d450a6f2154f231e5c284c148ab (patch) | |
tree | 4ca8a60148e611c0f4e8a1cb9e63f48a53d1edd6 /sd | |
parent | 46d6dc0e67f9ff1d4b606372ed58101e3c62b7a1 (diff) |
cid#1539501 Unchecked dynamic_cast
Change-Id: I5b369c51259036e02609e5ad66b882063aa9e309
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155369
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 789f419716f8..197c13283324 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2331,15 +2331,10 @@ OString SdXImpressDocument::getViewRenderState(SfxViewShell* pViewShell) OStringBuffer aState; DrawViewShell* pView = nullptr; - if (pViewShell) - { - ViewShellBase* pShellBase = dynamic_cast<ViewShellBase*>(pViewShell); + if (ViewShellBase* pShellBase = dynamic_cast<ViewShellBase*>(pViewShell)) pView = dynamic_cast<DrawViewShell*>(pShellBase->GetMainViewShell().get()); - } else - { pView = GetViewShell(); - } if (pView) { |