summaryrefslogtreecommitdiff
path: root/sc/source/ui/navipi
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-11-12 10:45:34 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-11-12 11:41:58 +0100
commitb3999abc97db7b54c0d35f87c74826a0b7763658 (patch)
tree874d14334cc657cc1e224de44ccc4384dc4ab789 /sc/source/ui/navipi
parent7cf0e43d39172cc083e7b64e06cf0730f14bcf19 (diff)
sc: pViewSh can be nullptr in the ScNavigatorDlg ctor
In case the nagivator dialog was enabled the last time the user exited from Calc, resulting in a crash-on-startup in subsequent runs. This avoids the need for a workaround to reset the user profile. Change-Id: I5041a9a258efb82051036d8404fde77c8985089a Reviewed-on: https://gerrit.libreoffice.org/82491 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/navipi')
-rw-r--r--sc/source/ui/navipi/navipi.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 75f508d73f5b..148064db54a1 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -461,7 +461,10 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent)
get(aLbDocuments, "documents");
get(aEdCol, "column");
ScTabViewShell* pViewSh = GetTabViewShell();
- aEdCol->SetNavigatorDlg(this, pViewSh->GetViewData().GetDocument());
+ if (pViewSh)
+ {
+ aEdCol->SetNavigatorDlg(this, pViewSh->GetViewData().GetDocument());
+ }
get(aEdRow, "row");
aEdRow->SetNavigatorDlg(this);
get(aTbxCmd, "toolbox");