summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-03 09:29:29 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2024-07-08 10:11:45 +0200
commit1bd256eaadd0a9036f40c3c6e3b1346b64380f34 (patch)
treeded3f3739900c98f53ca1ff0e10e6ba9e93f7938 /sd
parent3b35f71312c8cb7515a07063d25007ee5be6bda0 (diff)
cid#1606793 Dereference before null check
Change-Id: Ia2d5c0e347322828a0fa3c6b5af2b6a27956d4aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169921 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit eb16a84eda6accabfc07067b7a85d7846036e5ce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170044 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews6.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 5b208c12d9df..94306b973bda 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -261,9 +261,12 @@ void DrawViewShell::ExecBmpMask( SfxRequest const & rReq )
case SID_BMPMASK_EXEC :
{
+ if (!mpDrawView)
+ return;
+
SdrGrafObj* pObj = nullptr;
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- if( mpDrawView && rMarkList.GetMarkCount() )
+ if( rMarkList.GetMarkCount() )
pObj = dynamic_cast< SdrGrafObj* >( rMarkList.GetMark(0)->GetMarkedSdrObj() );
if ( pObj && !mpDrawView->IsTextEdit() )