summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2020-05-29 16:18:24 +0300
committerAndras Timar <andras.timar@collabora.com>2020-06-10 12:28:31 +0200
commit8fba80db6996fef9e4bf17e0c5d1ec69214ca8bf (patch)
tree1b33857df60aa6396667cfef3d4cff99797653bf
parent142d613b6afe25eedd3cd557af48a73ad12f2d63 (diff)
tdf#128502: Avoid potential crash in mobile app with multiple open documents
Change-Id: Ibb819818db40b2f086e5c1f2330a7f8f2fcc1727 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95148 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 4145fd55769c..5cdac44a46ab 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -544,7 +544,7 @@ int ScModelObj::getParts()
int ScModelObj::getPart()
{
ScViewData* pViewData = ScDocShell::GetViewData();
- return pViewData->GetViewShell()->getPart();
+ return pViewData ? pViewData->GetViewShell()->getPart() : 0;
}
OUString ScModelObj::getPartInfo( int nPart )