e comp - shape rects - handle logic hol where num > 0 but rects is null

don't fall in this hole and crash...
enlightenment-0.24
Carsten Haitzler 3 years ago
parent 81d8a1351d
commit 48bcb8d0b3
  1. 2
      src/bin/e_comp_object.c
  2. 3
      src/bin/e_comp_x.c

@ -3850,7 +3850,7 @@ e_comp_object_shape_apply(Evas_Object *obj)
_e_comp_object_alpha_set(cw);
return;
}
if (cw->ec->shaped)
if ((cw->ec->shaped) && (cw->ec->shape_rects))
{
unsigned char *spix, *sp;

@ -3309,7 +3309,7 @@ _e_comp_x_client_shape_rects_check(E_Client *ec, Ecore_X_Rectangle *rects, int n
}
}
}
if (changed)
if ((changed) && (rects))
{
E_FREE(ec->shape_rects);
ec->shape_rects = (Eina_Rectangle*)rects;
@ -4323,6 +4323,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
{
ec->shaped = 1;
E_FREE(ec->shape_rects);
ec->shape_rects_num = 0;
E_FREE(ec->shape_input_rects);
ec->shape_input_rects_num = 0;
e_comp_object_frame_theme_set(ec->frame, E_COMP_OBJECT_FRAME_RESHADOW);

Loading…
Cancel
Save