summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-12-20 14:56:33 +0200
committerTor Lillqvist <tml@collabora.com>2013-12-20 14:59:56 +0200
commit0eb1ef39084a978e8c2bec977ebabf6708f0c073 (patch)
tree1478985eb496716b6f6b7e835f20ad5dcc9a9695 /sw
parent674aeac88ffa1840f2d6a7f33656193aaebc9a0c (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
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();
}