Avoid Svace DEREF_OF_NULL warning in constraint-impl.h 27/117827/3
authorPaul Wisbey <p.wisbey@samsung.com>
Tue, 7 Mar 2017 13:39:34 +0000 (13:39 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Fri, 7 Apr 2017 13:05:09 +0000 (06:05 -0700)
(reduces the number of False positives)

Change-Id: I3d1895288865f2e19c44ec279131e7303ce7d915

dali/internal/event/animation/constraint-impl.h

index cb671d6..78f86f1 100644 (file)
@@ -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;
+      }
     }
   }