From da03d6aa9c09a9b291fda15d3fa5964b31da0e16 Mon Sep 17 00:00:00 2001 From: Paul Wisbey Date: Tue, 7 Mar 2017 13:39:34 +0000 Subject: [PATCH] Avoid Svace DEREF_OF_NULL warning in constraint-impl.h (reduces the number of False positives) Change-Id: I3d1895288865f2e19c44ec279131e7303ce7d915 --- dali/internal/event/animation/constraint-impl.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dali/internal/event/animation/constraint-impl.h b/dali/internal/event/animation/constraint-impl.h index cb671d6..78f86f1 100644 --- a/dali/internal/event/animation/constraint-impl.h +++ b/dali/internal/event/animation/constraint-impl.h @@ -508,13 +508,16 @@ private: } DALI_ASSERT_DEBUG( NULL != sceneGraphConstraint ); - sceneGraphConstraint->SetRemoveAction( mRemoveAction ); + if( NULL != sceneGraphConstraint ) + { + sceneGraphConstraint->SetRemoveAction( mRemoveAction ); // object is being used in a separate thread; queue a message to apply the constraint - ApplyConstraintMessage( GetEventThreadServices(), *targetObject, *sceneGraphConstraint ); + ApplyConstraintMessage( GetEventThreadServices(), *targetObject, *sceneGraphConstraint ); - // Keep a raw-pointer to the scene-graph constraint - mSceneGraphConstraint = sceneGraphConstraint; + // Keep a raw-pointer to the scene-graph constraint + mSceneGraphConstraint = sceneGraphConstraint; + } } } -- 2.7.4