summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/lokhelper.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index c5fb171f246b..822547469799 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -83,6 +83,10 @@ int SfxLokHelper::getView(SfxViewShell* pViewShell)
{
if (!pViewShell)
pViewShell = SfxViewShell::Current();
+ // Still no valid view shell? Then no idea.
+ if (!pViewShell)
+ return -1;
+
return pViewShell->GetViewShellId();
}