* e: don't crash to easily when Ecore_Evas windows can't be created.
authorCedric BAIL <cedric.bail@free.fr>
Fri, 2 Jul 2010 13:47:31 +0000 (13:47 +0000)
committerCedric BAIL <cedric.bail@free.fr>
Fri, 2 Jul 2010 13:47:31 +0000 (13:47 +0000)
SVN revision: 49996

src/bin/e_canvas.c
src/bin/e_popup.c

index 6ecd0a4..d734ba1 100644 (file)
@@ -228,6 +228,8 @@ e_canvas_new(int engine_hint, Ecore_X_Window win, int x, int y, int w, int h,
             if (direct_resize) ecore_evas_software_x11_direct_resize_set(ee, 1);
             if (win_ret) *win_ret = ecore_evas_software_x11_window_get(ee);
          }
+       else
+         EINA_LOG_ERR("Impossible to build any Ecore_Evas window !!");
      }
    return ee;
 }
index c113179..8eef9e6 100644 (file)
@@ -53,6 +53,11 @@ e_popup_new(E_Zone *zone, int x, int y, int w, int h)
    pop->ecore_evas = e_canvas_new(e_config->evas_engine_popups, pop->zone->container->win,
                                  pop->zone->x + pop->x, pop->zone->y + pop->y, pop->w, pop->h, 1, 1,
                                  &(pop->evas_win));
+   if (!pop->ecore_evas)
+     {
+       free(pop);
+       return NULL;
+     }
    /* avoid excess exposes when shaped - set damage avoid to 1 */
 //   ecore_evas_avoid_damage_set(pop->ecore_evas, 1);