summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-21 13:09:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-21 22:29:31 +0200
commitaa58890324bf15560c66fcb58a19c169da228c2e (patch)
treea5672a19814df67080ffb2fc461f1d6f77db66bf /svx
parentf9a14f3d021d78bded54cde0462669ea10d7c546 (diff)
Resolves: tdf#108610 crash on double delete of async event
regression from... commit e4e4d5713e248f02faf7aa6199b11e152973de8e Date: Wed May 31 15:40:25 2017 +0200 clang-tidy readability-delete-null-pointer which in turn triggered some loplugin:useuniqueptr lets revert the fix of commit 93a288bd75d7caed46d6f29bf006f3d97a9602a9 Date: Mon Jun 12 21:44:57 2017 +0200 svx: fix the std::unique_ptr that deletes itself twice and make the code do exactly like it always did pre initial change Change-Id: Ia922fccdc476e40b5c672b097b04c229215ce38e Reviewed-on: https://gerrit.libreoffice.org/39052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofgraphic.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
index 98a8c8b1b416..70d676a4ddef 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
@@ -207,7 +207,7 @@ namespace sdr
// #i103720# forget event to avoid possible deletion by the following ActionChanged call
// which may use createPrimitive2DSequence/impPrepareGraphicWithAsynchroniousLoading again.
// Deletion is actually done by the scheduler who leaded to coming here
- mpAsynchLoadEvent = nullptr;
+ mpAsynchLoadEvent.release();
// Invalidate all paint areas and check existing animation (which may have changed).
GetViewContact().ActionChanged();
@@ -226,7 +226,7 @@ namespace sdr
"ViewObjectContactOfGraphic::forgetAsynchGraphicLoadingEvent: Forced to forget another event then I have scheduled (?)");
// forget event
- mpAsynchLoadEvent = nullptr;
+ mpAsynchLoadEvent.release();
}
}
@@ -302,8 +302,6 @@ namespace sdr
ViewObjectContactOfGraphic::~ViewObjectContactOfGraphic()
{
- // explicitly call this to avoid it double-freeing itself
- forgetAsynchGraphicLoadingEvent(mpAsynchLoadEvent.get());
}
} // end of namespace contact
} // end of namespace sdr