sw/source/ui/misc/swruler.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 0eb1ef39084a978e8c2bec977ebabf6708f0c073 Author: Tor Lillqvist <t...@collabora.com> Date: Fri Dec 20 14:56:33 2013 +0200 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 diff --git a/sw/source/ui/misc/swruler.cxx b/sw/source/ui/misc/swruler.cxx index fa396d0..b1035c9 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(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits