evas/canvas : bail out in case of empty or null dash.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Subhransu Mohanty 2015-04-03 16:38:14 +02:00 committed by Cedric BAIL
parent 4ad8b3ab52
commit 5c31036249
1 changed files with 3 additions and 0 deletions

View 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 ;