summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-12-20 14:56:33 +0200
committerAndras Timar <andras.timar@collabora.com>2014-12-03 08:16:47 -0800
commitc5822853ed48df7cc67d16d3910097e4b33001c2 (patch)
tree80fb91de466ad7e3bc50b2978f1262af79d07f8f /sw
parent2af6880c44cd9d4083c1258d5ad46238f53a6c4f (diff)
Prevent occasional crash
I came across the crash by accident when checking how it works to have multiple windows showing the same document. Pasting in lots of text and then quickly telling LO to exit with Cmd-Q caused a crash here as GetPostItMgr() returned NULL. Change-Id: Ib9e636df0832a679a1d81fa3856ea0a7105a69c3 (cherry picked from commit 0eb1ef39084a978e8c2bec977ebabf6708f0c073) Reviewed-on: https://gerrit.libreoffice.org/13219 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/misc/swruler.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/ui/misc/swruler.cxx b/sw/source/ui/misc/swruler.cxx
index fa396d062aff..b1035c9798c3 100644
--- a/sw/source/ui/misc/swruler.cxx
+++ b/sw/source/ui/misc/swruler.cxx
@@ -56,7 +56,8 @@ void SwCommentRuler::Paint( const Rectangle& rRect )
{
SvxRuler::Paint( rRect );
// Don't draw if there is not any note
- if ( mpViewShell->GetPostItMgr()->HasNotes() )
+ if ( mpViewShell->GetPostItMgr()
+ && mpViewShell->GetPostItMgr()->HasNotes() )
DrawCommentControl();
}