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

Tor Lillqvist tml at collabora.com
Wed Dec 3 04:22:41 PST 2014


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

New commits:
commit 8ee024894e188d7f37807f170e118168db0a45e5
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)
    (cherry picked from commit f35f0e1cafffb636653f24cab489d208d2851787)
    Reviewed-on: https://gerrit.libreoffice.org/13243
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.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