summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-01 21:09:48 +0100
committerMichael Stahl <mstahl@redhat.com>2016-10-04 14:02:30 +0000
commit59a4486bb8519fbd54da0a924b7a5f9b712b3bf2 (patch)
tree1bf6e9933967f459aa2378cf6138f2067b80c193
parent4968d55270f2eaf100cfe8cc071fa302e21203d3 (diff)
Engine() return mpOutliner, so can crash if Engine() used post delete
if Deactivate called during ::dispose Change-Id: I066dcc52278f12442de0281c8d783353aed5a186 (cherry picked from commit 86617760eb8bc6c0b2713b9496ade9203d1077a5) Reviewed-on: https://gerrit.libreoffice.org/29443 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 0e59a38b8f8a..7cddb80e8917 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -297,6 +297,7 @@ void AnnotationWindow::dispose()
mpMeta.disposeAndClear();
delete mpOutlinerView;
delete mpOutliner;
+ mpOutliner = nullptr;
mpVScrollbar.disposeAndClear();
mpTextWindow.disposeAndClear();
FloatingWindow::dispose();
@@ -614,6 +615,9 @@ void AnnotationWindow::Deactivate()
if (mrManager.getPopupMenuActive())
return;
+ if (!mpOutliner) //in dispose
+ return;
+
Reference< XAnnotation > xAnnotation( mxAnnotation );
// write changed text back to annotation