i'm just seeing some declarations not done at the beginning of the scope :

>     MAGIC_CHECK_END();
>     Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);

this should be fixed

Vincent

On Mon, Nov 12, 2012 at 3:22 AM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> Log:
> protect against a whole bunch of NULLS that the new eo stuff brings out.
>
>
>
> Author:       raster
> Date:         2012-11-11 18:22:39 -0800 (Sun, 11 Nov 2012)
> New Revision: 79129
> Trac:         http://trac.enlightenment.org/e/changeset/79129
>
> Modified:
>   trunk/efl/src/lib/evas/canvas/evas_callbacks.c 
> trunk/efl/src/lib/evas/canvas/evas_layer.c 
> trunk/efl/src/lib/evas/canvas/evas_object_main.c
>
> Modified: trunk/efl/src/lib/evas/canvas/evas_callbacks.c
> ===================================================================
> --- trunk/efl/src/lib/evas/canvas/evas_callbacks.c      2012-11-12 00:50:55 
> UTC (rev 79128)
> +++ trunk/efl/src/lib/evas/canvas/evas_callbacks.c      2012-11-12 02:22:39 
> UTC (rev 79129)
> @@ -173,6 +173,7 @@
>  evas_object_event_callback_clear(Evas_Object *eo_obj)
>  {
>     Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
> +   if (!obj) return;
>     if (!obj->callbacks) return;
>     if (!obj->callbacks->deletions_waiting) return;
>     obj->callbacks->deletions_waiting = 0;
> @@ -188,6 +189,7 @@
>  evas_event_callback_clear(Evas *eo_e)
>  {
>     Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
> +   if (!e) return;
>     if (!e->callbacks) return;
>     if (!e->callbacks->deletions_waiting) return;
>     e->callbacks->deletions_waiting = 0;
> @@ -205,6 +207,7 @@
>     Evas_Func_Node *fn;
>     Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
>
> +   if (!obj) return;
>     if (!obj->callbacks) return;
>     EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn)
>        fn->delete_me = 1;
> @@ -215,6 +218,7 @@
>  {
>     /* MEM OK */
>     Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
> +   if (!obj) return;
>     if (!obj->callbacks) return;
>     evas_event_callback_list_post_free(&obj->callbacks->callbacks);
>     EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks);
> @@ -227,6 +231,7 @@
>     Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
>     Evas_Func_Node *fn;
>
> +   if (!e) return;
>     if (!e->callbacks) return;
>     EINA_INLIST_FOREACH(e->callbacks->callbacks, fn)
>        fn->delete_me = 1;
> @@ -237,6 +242,7 @@
>  {
>     Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
>     /* MEM OK */
> +   if (!e) return;
>     if (!e->callbacks) return;
>     evas_event_callback_list_post_free(&e->callbacks->callbacks);
>     EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks);
> @@ -249,6 +255,7 @@
>     Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
>     Eina_Inlist **l_mod = NULL, *l;
>
> +   if (!e) return;
>     _evas_walk(e);
>     if (e->callbacks)
>       {
> @@ -285,6 +292,7 @@
>     Evas_Button_Flags flags = EVAS_BUTTON_NONE;
>     Evas_Public_Data *e;
>
> +   if (!obj) return;
>     if ((obj->delete_me) || (!obj->layer)) return;
>     if ((obj->last_event == event_id) &&
>         (obj->last_event_type == type)) return;
> @@ -418,6 +426,7 @@
>     return;
>     MAGIC_CHECK_END();
>
> +   if (!obj) return;
>     if (!func) return;
>
>     if (!obj->callbacks)
> @@ -453,6 +462,7 @@
>     MAGIC_CHECK_END();
>     Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
>
> +   if (!obj) return NULL;
>     if (!func) return NULL;
>
>     if (!obj->callbacks) return NULL;
> @@ -485,6 +495,7 @@
>     MAGIC_CHECK_END();
>     Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
>
> +   if (!obj) return NULL;
>     if (!func) return NULL;
>
>     if (!obj->callbacks) return NULL;
> @@ -524,6 +535,7 @@
>     return;
>     MAGIC_CHECK_END();
>
> +   if (!e) return;
>     if (!func) return;
>
>     if (!e->callbacks)
> @@ -558,6 +570,7 @@
>     return NULL;
>     MAGIC_CHECK_END();
>
> +   if (!e) return NULL;
>     if (!func) return NULL;
>
>     if (!e->callbacks) return NULL;
> @@ -590,6 +603,7 @@
>     MAGIC_CHECK_END();
>     Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
>
> +   if (!e) return NULL;
>     if (!func) return NULL;
>
>     if (!e->callbacks) return NULL;
> @@ -621,6 +635,7 @@
>     MAGIC_CHECK_END();
>
>     Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
> +   if (!e) return;
>     EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, );
>     pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback);
>     if (!pc) return;
> @@ -643,6 +658,7 @@
>     MAGIC_CHECK_END();
>
>     Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
> +   if (!e) return;
>     EINA_LIST_FOREACH(e->post_events, l, pc)
>       {
>          if (pc->func == func)
> @@ -664,6 +680,7 @@
>     MAGIC_CHECK_END();
>
>     Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
> +   if (!e) return;
>     EINA_LIST_FOREACH(e->post_events, l, pc)
>       {
>          if ((pc->func == func) && (pc->data == data))
>
> Modified: trunk/efl/src/lib/evas/canvas/evas_layer.c
> ===================================================================
> --- trunk/efl/src/lib/evas/canvas/evas_layer.c  2012-11-12 00:50:55 UTC (rev 
> 79128)
> +++ trunk/efl/src/lib/evas/canvas/evas_layer.c  2012-11-12 02:22:39 UTC (rev 
> 79129)
> @@ -8,6 +8,8 @@
>  {
>     Evas_Layer *lay;
>
> +   if (!obj) return;
> +   if (!e) return;
>     if (obj->in_layer) return;
>     lay = evas_layer_find(e, obj->cur.layer);
>     if (!lay)
>
> Modified: trunk/efl/src/lib/evas/canvas/evas_object_main.c
> ===================================================================
> --- trunk/efl/src/lib/evas/canvas/evas_object_main.c    2012-11-12 00:50:55 
> UTC (rev 79128)
> +++ trunk/efl/src/lib/evas/canvas/evas_object_main.c    2012-11-12 02:22:39 
> UTC (rev 79129)
> @@ -97,9 +97,12 @@
>     if (obj->cache_map) evas_map_free(obj->cache_map);
>     if (obj->map.surface)
>       {
> -        obj->layer->evas->engine.func->image_map_surface_free
> -          (obj->layer->evas->engine.data.output,
> -              obj->map.surface);
> +        if (obj->layer)
> +          {
> +             obj->layer->evas->engine.func->image_map_surface_free
> +               (obj->layer->evas->engine.data.output,
> +                   obj->map.surface);
> +          }
>          obj->map.surface = NULL;
>       }
>     evas_object_grabs_cleanup(eo_obj, obj);
> @@ -143,6 +146,7 @@
>     Evas_Object *eo_obj2;
>     Eina_Bool movch = EINA_FALSE;
>
> +   if (!obj->layer) return;
>     if (obj->layer->evas->nochange) return;
>     obj->layer->evas->changed = EINA_TRUE;
>
> @@ -320,6 +324,7 @@
>     int x, y, w, h;
>
>     if (!obj) return;
> +   if (!obj->layer) return;
>
>     if (obj->is_smart) goto end;
>     /* FIXME: was_v isn't used... why? */
> @@ -528,17 +533,20 @@
>     if (obj->focused)
>       {
>          obj->focused = EINA_FALSE;
> -        obj->layer->evas->focused = NULL;
> +        if (obj->layer)
> +          obj->layer->evas->focused = NULL;
>          _evas_object_event_new();
>          evas_object_event_callback_call(eo_obj, obj, 
> EVAS_CALLBACK_FOCUS_OUT, NULL, _evas_event_counter);
> -        _evas_post_event_callback_call(obj->layer->evas->evas, 
> obj->layer->evas);
> +        if (obj->layer)
> +          _evas_post_event_callback_call(obj->layer->evas->evas, 
> obj->layer->evas);
>       }
>     _evas_object_event_new();
>     evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_DEL, NULL, 
> _evas_event_counter);
> -   _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
> -   if (obj->mouse_grabbed > 0)
> +   if (obj->layer)
> +     _evas_post_event_callback_call(obj->layer->evas->evas, 
> obj->layer->evas);
> +   if ((obj->mouse_grabbed > 0) && (obj->layer))
>        obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
> -   if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
> +   if (((obj->mouse_in) || (obj->mouse_grabbed > 0)) && (obj->layer))
>        obj->layer->evas->pointer.object.in = 
> eina_list_remove(obj->layer->evas->pointer.object.in, eo_obj);
>     obj->mouse_grabbed = 0;
>     obj->mouse_in = 0;
> @@ -559,7 +567,8 @@
>     if (obj->is_smart) evas_object_smart_del(eo_obj);
>     _evas_object_event_new();
>     evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_FREE, NULL, 
> _evas_event_counter);
> -   _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
> +   if (obj->layer)
> +     _evas_post_event_callback_call(obj->layer->evas->evas, 
> obj->layer->evas);
>     evas_object_smart_cleanup(eo_obj);
>     obj->delete_me = 1;
>     evas_object_change(eo_obj, obj);
> @@ -713,7 +722,8 @@
>     int nx = 0, ny = 0;
>
>     if (obj->delete_me) return;
> -
> +   if (!obj->layer) return;
> +
>     nx = x;
>     ny = y;
>
> @@ -808,6 +818,7 @@
>     Eina_Bool source_invisible = EINA_FALSE;
>
>     if (obj->delete_me) return;
> +   if (!obj->layer) return;
>     if (w < 0) w = 0; if (h < 0) h = 0;
>
>     if (evas_object_intercept_call_resize(eo_obj, w, h)) return;
> @@ -893,7 +904,7 @@
>     Evas_Coord *x = va_arg(*list, Evas_Coord *);
>     Evas_Coord *y = va_arg(*list, Evas_Coord *);
>
> -   if (obj->delete_me)
> +   if ((obj->delete_me) || (!obj->layer))
>       {
>          if (x) *x = 0; if (y) *y = 0;
>          return;
> @@ -1400,8 +1411,9 @@
>  }
>
>  static void
> -_show (Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
> +_show(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
>  {
> +   if (!obj->layer) return;
>     if (obj->delete_me) return;
>     if (evas_object_intercept_call_show(eo_obj)) return;
>     if (obj->is_smart)
> @@ -1445,6 +1457,7 @@
>     MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
>     return;
>     MAGIC_CHECK_END();
> +   if (!obj->layer) return;
>     if (obj->delete_me) return;
>     if (evas_object_intercept_call_hide(eo_obj)) return;
>     if (obj->is_smart)
> @@ -1805,7 +1818,7 @@
>     const Evas_Object_Protected_Data *obj = _pd;
>     Evas **evas = va_arg(*list, Evas **);
>
> -   if (obj->delete_me)
> +   if ((obj->delete_me) || (!obj->layer))
>       {
>          *evas = NULL;
>          return;
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_nov
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to