[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source

Tor Lillqvist tml at collabora.com
Mon Dec 1 15:04:08 PST 2014


 sw/source/ui/misc/swruler.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a0cfe0f2dac64eb880a134a69fefa5c7825be7b8
Author: Tor Lillqvist <tml at 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
    (cherry picked from commit 0eb1ef39084a978e8c2bec977ebabf6708f0c073)
    Reviewed-on: https://gerrit.libreoffice.org/13219
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

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();
 }
 


More information about the Libreoffice-commits mailing list