ANIMATOR : Fixed null pointer dereferences 50/18350/1
authorjinwooim.bae <jinwooim.bae@samsung.com>
Fri, 21 Mar 2014 03:13:30 +0000 (12:13 +0900)
committerjinwooim.bae <jinwooim.bae@samsung.com>
Fri, 21 Mar 2014 03:13:30 +0000 (12:13 +0900)
This code is null pointer dereferences. so it is Fixed.

Change-Id: I5638026be3e9a64d4d7d1cec1449a653d22d928e
Signed-off-by: jinwooim.bae <jinwooim.bae@samsung.com>
org.tizen.webuibuilder/src/org/tizen/webuibuilder/animator/ui/views/timeline/command/TimelineFrameDeleteCommand.java

index 28e22e9..0927b24 100644 (file)
@@ -86,9 +86,13 @@ public class TimelineFrameDeleteCommand extends Command {
      */
     @Override
     public void execute() {
-        if (curveFrames != null)
-            ((AnimatorFrame) keyframe.getPrevChild(frame))
-                    .setCurveFrames(new ArrayList<AnimatorCurveFrame>());
+        if (curveFrames != null) {
+            AnimatorModel childFrame = keyframe.getPrevChild(frame);
+            if (childFrame != null) {
+                ((AnimatorFrame) childFrame).setCurveFrames(new ArrayList<AnimatorCurveFrame>());
+            }
+        }
+
         keyframe.removeChild(frame, true);
 
         AnimatorModelManager animatorModelManager =