fix for freeing NULL pointer.

This commit is contained in:
Campbell Barton
2012-08-06 13:04:40 +00:00
parent 43d855c846
commit 7beb47bd69

View File

@@ -1484,7 +1484,9 @@ MaskLayerShape *BKE_mask_layer_shape_alloc(MaskLayer *masklay, const int frame)
void BKE_mask_layer_shape_free(MaskLayerShape *masklay_shape)
{
MEM_freeN(masklay_shape->data);
if (masklay_shape->data) {
MEM_freeN(masklay_shape->data);
}
MEM_freeN(masklay_shape);
}