summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-07-28 23:59:48 +0530
committerPranav Kant <pranavk@collabora.co.uk>2017-10-02 10:57:46 +0530
commitea03e6ef0a3847fc343eacee32836da84b863431 (patch)
tree921e8b85f97297a2868d366b995a98406bcaa124 /sw
parentddac37b94f03a906c541350e9e8e225fa808dabd (diff)
lokdialog: Some checks if invalid uno command is provided
Change-Id: I914564f67716f4e218d42ac4f0545e46e9609389
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 2a5152bbf431..b00047a54fbe 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3643,6 +3643,11 @@ void SwXTextDocument::paintDialog(const vcl::DialogID& rDialogID, VirtualDevice&
SfxViewFrame* pViewFrame = pDocShell->GetView()->GetViewFrame();
SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
const SfxSlot* pSlot = pSlotPool->GetUnoSlot(rDialogID);
+ if (!pSlot)
+ {
+ SAL_WARN("lok.dialog", "No slot found for " << rDialogID);
+ return;
+ }
SfxChildWindow* pChild = pViewFrame->GetChildWindow(pSlot->GetSlotId());
if (!pChild)
{