summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2020-06-25 15:39:02 +0300
committerTor Lillqvist <tml@collabora.com>2020-06-29 13:56:28 +0200
commit7f3b04e5d593e72077db434e65b987938fdbfa9d (patch)
tree32aff9cbf7841f8756a03308c182621d98932453 /sc
parentcfb3eb9a76423eba54145a956f6d3b83d162d2b8 (diff)
Avoid crash with multiple documents open in the iOS app
Also add a FIXME. Just 'hoping' is not good enough. But yeah, much of this code indeeed works mostly by accident. Change-Id: Ic6bcbc10229a0b7cdd8d696794efe152fca4faea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97117 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97401
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 2365445381cc..e3918f38b165 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -500,7 +500,13 @@ void ScModelObj::paintTile( VirtualDevice& rDevice,
{
// There seems to be no clear way of getting the grid window for this
// particular document, hence we need to hope we get the right window.
+ // FIXME: "hope"? Are you kidding me?
ScViewData* pViewData = ScDocShell::GetViewData();
+
+ // FIXME
+ if (!pViewData)
+ return;
+
ScGridWindow* pGridWindow = pViewData->GetActiveWin();
// update the size of the area we are painting