Do not evaluate deleted borders.
authorGustavo Sverzut Barbieri <barbieri@gmail.com>
Mon, 15 Jun 2009 01:33:41 +0000 (01:33 +0000)
committerGustavo Sverzut Barbieri <barbieri@gmail.com>
Mon, 15 Jun 2009 01:33:41 +0000 (01:33 +0000)
This bug was showing when fast toggling between advanced<->basic in
config dialogs.

Note, however, that there are a remaining alien bug with fast
toggling. It's aborting due adding evas object as member of another
from other canvas, which is not allowed. I tried to debug it and it's
REALLY weird, the advanced or basic create_widgets() are being called
twice, from inside the same function, like if the create_widgets() was
calling itself, but the code do not do that, I traced some that would
happen from e_widget_button_add()!!! Like if we had threads of were
being preempted from nowhere, really strange... seems like a stack
corruption :-(

SVN revision: 41038

src/bin/e_border.c

index 0dd37fa..2f2dfa7 100644 (file)
@@ -2770,6 +2770,7 @@ e_border_idler_before(void)
             bl = e_container_border_list_first(con);
             while ((bd = e_container_border_list_next(bl)))
               {
+                 if (e_object_is_del(E_OBJECT(bd))) continue;
                  if ((bd->changes.visible) && (!bd->visible))
                    {
                       ecore_x_window_hide(bd->win);
@@ -5688,6 +5689,12 @@ _e_border_eval(E_Border *bd)
    int rem_change = 0;
    int send_event = 1;
    int zx, zy, zw, zh;
+
+   if (e_object_is_del(E_OBJECT(bd)))
+     {
+       fprintf(stderr, "ERROR: _e_border_eval(%p) with deleted border!\n", bd);
+       return;
+     }
    
    _e_border_hook_call(E_BORDER_HOOK_EVAL_PRE_FETCH, bd);
    if (bd->zone)