summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-01 21:09:48 +0100
committerAndras Timar <andras.timar@collabora.com>2016-10-10 10:33:16 +0200
commit5a052d8a792fb1a5156030cf827c6f8cf15344c7 (patch)
tree5849a8143ca14e0c96b84d0bc9130e934297fc67 /sd
parent058c92aaee400815877d29bb9b20781e121f003e (diff)
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@redhat.com> Tested-by: jan iversen <jani@documentfoundation.org> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 0570ddd7377c825e6cff7e71d07452223d230b6b)
Diffstat (limited to 'sd')
-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 dcbeb2262a75..1b2fd3808872 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