From afc5889493a16a74dd8086ddc02c84fa78fd401d Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sat, 21 Mar 2020 11:48:40 -0400 Subject: sw: check for null SdrObject before accessing Change-Id: I30f1cc658450982232feea10dbe9c5bfefe07d91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90896 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian (cherry picked from commit 8ed4ac6152c96280616a784b47c4f75df147501a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90946 Tested-by: Jenkins --- sw/source/uibase/uiview/viewdraw.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 6866b31cd3b1..465ab3dfc82d 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -668,6 +668,8 @@ bool SwView::AreOnlyFormsSelected() const { // Except controls, are still normal draw objects selected? SdrObject *pSdrObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); + if (!pSdrObj) + continue; if (!HasOnlyObj(pSdrObj, SdrInventor::FmForm)) { -- cgit