- animatableProperty might be null, so move dereferencing code into the null
check block
<Prevent message>
8. var_compare_op: Comparing animatableProperty to null implies that animatableProperty might be null.
1235 if(!animatableProperty)
CID 385005 (#1 of 1): Dereference after null check (FORWARD_NULL)
10. var_deref_op: Dereferencing null pointer animatableProperty.
1245 mAnimatableProperties.PushBack( new AnimatablePropertyMetadata( index, typeInfo->GetComponentIndex(index), animatableProperty->type, animatableProperty->GetSceneGraphProperty() ) );
Change-Id: Ibf6a6670e258b8729b86da80991e0a3ece64452e
}
}
- // Create the metadata for the property component.
- mAnimatableProperties.PushBack( new AnimatablePropertyMetadata( index, typeInfo->GetComponentIndex(index), animatableProperty->type, animatableProperty->GetSceneGraphProperty() ) );
+ if(animatableProperty)
+ {
+ // Create the metadata for the property component.
+ mAnimatableProperties.PushBack( new AnimatablePropertyMetadata( index, typeInfo->GetComponentIndex(index), animatableProperty->type, animatableProperty->GetSceneGraphProperty() ) );
+ }
}
// The metadata has just been added and therefore should be in the end of the vector.