evas/canvas : bail out in case of empty or null dash.
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Fri, 3 Apr 2015 14:38:14 +0000 (16:38 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Fri, 3 Apr 2015 14:38:14 +0000 (16:38 +0200)
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/evas/canvas/evas_vg_shape.c

index 7b7ec01..e67c3b5 100644 (file)
@@ -199,6 +199,9 @@ _efl_vg_shape_efl_gfx_shape_stroke_dash_set(Eo *obj EINA_UNUSED,
    pd->stroke.dash = NULL;
    pd->stroke.dash_count = 0;
 
+   // check for null or empty dash
+   if (!dash || !length) return;
+
    pd->stroke.dash = malloc(sizeof (Efl_Gfx_Dash) * length);
    if (!pd->stroke.dash) return ;