Avoid constraint suicide during ObjectDestroyed callbacks 29/49329/4
authorPaul Wisbey <p.wisbey@samsung.com>
Mon, 12 Oct 2015 15:38:49 +0000 (16:38 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Mon, 12 Oct 2015 15:42:18 +0000 (16:42 +0100)
commit293c756982a7ae682a07b95bd20ae371d0a2fa01
tree55da39e037f939b6c00c9c7b1d87c6e5168c7766
parent99c29166b5883f4e1b4db74c005d3f39d29abce7
Avoid constraint suicide during ObjectDestroyed callbacks

Valgrind reports this when the gallery grid layout terminates:

==5351== Invalid write of size 4
==5351==    at 0x4F8FF32: Dali::Internal::ConstraintBase::ObjectDestroyed(Dali::Internal::Object&) (constraint-base.cpp:218)
==5351==    by 0x4F962B9: Dali::Internal::Object::~Object() (object-impl.cpp:1206)
==5351==    by 0x4FA810B: Dali::Internal::CustomObject::~CustomObject() (custom-object-internal.cpp:110)

The issue is that constraints commit suicide during ObjectDestroyed callbacks,
with a (dangerous) call to mTargetObject->RemoveConstraint.

Change-Id: I8da276fda1b4dfd987a8bd699ed3d908994b361e
dali/internal/event/animation/constraint-base.cpp