[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sd/source

Caolán McNamara caolanm at redhat.com
Tue Oct 4 15:36:55 UTC 2016


 sd/source/ui/annotations/annotationwindow.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 0570ddd7377c825e6cff7e71d07452223d230b6b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Oct 1 21:09:48 2016 +0100

    Engine() return mpOutliner, so can crash if Engine() used post delete
    
    if Deactivate called during ::dispose
    
    (cherry picked from commit 86617760eb8bc6c0b2713b9496ade9203d1077a5)
    
    Change-Id: I066dcc52278f12442de0281c8d783353aed5a186
    Reviewed-on: https://gerrit.libreoffice.org/29444
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: jan iversen <jani at documentfoundation.org>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index dcbeb22..1b2fd38 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -298,6 +298,7 @@ void AnnotationWindow::dispose()
     mpMeta.disposeAndClear();
     delete mpOutlinerView;
     delete mpOutliner;
+    mpOutliner = nullptr;
     mpVScrollbar.disposeAndClear();
     mpTextWindow.disposeAndClear();
     FloatingWindow::dispose();
@@ -613,6 +614,9 @@ void AnnotationWindow::SetColor()
 
 void AnnotationWindow::Deactivate()
 {
+    if (!mpOutliner) //in dispose
+        return;
+
     Reference< XAnnotation > xAnnotation( mxAnnotation );
 
     // write changed text back to annotation


More information about the Libreoffice-commits mailing list