some extra object checks to catch wierdness/badness..
also fix segv if you have NO apps :) SVN revision: 12925
This commit is contained in:
parent
f937e4a170
commit
5cfae17870
|
@ -218,6 +218,8 @@ _e_int_menus_apps_scan(E_Menu *m)
|
|||
|
||||
a = e_object_data_get(E_OBJECT(m));
|
||||
e_app_subdir_scan(a, 0);
|
||||
if (a)
|
||||
{
|
||||
for (l = a->subapps; l; l = l->next)
|
||||
{
|
||||
a = l->data;
|
||||
|
@ -240,6 +242,7 @@ _e_int_menus_apps_scan(E_Menu *m)
|
|||
app_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (app_count == 0)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
|
@ -266,7 +269,7 @@ _e_int_menus_apps_del_hook(void *obj)
|
|||
E_Menu_Item *mi;
|
||||
|
||||
mi = l->data;
|
||||
if (mi->submenu) e_object_del(mi->submenu);
|
||||
if (mi->submenu) e_object_del(E_OBJECT(mi->submenu));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -184,6 +184,18 @@ e_object_error(E_Object *obj)
|
|||
"%s",
|
||||
obj, magic,
|
||||
bt);
|
||||
else if (obj->references < 0)
|
||||
snprintf(buf, sizeof(buf),
|
||||
"Object [%p] has negative references (%i).\n"
|
||||
"%s",
|
||||
obj, obj->references,
|
||||
bt);
|
||||
else if (obj->references > 100)
|
||||
snprintf(buf, sizeof(buf),
|
||||
"Object [%p] has unusually high reference count (%i).\n"
|
||||
"%s",
|
||||
obj, obj->references,
|
||||
bt);
|
||||
/* it's all ok! */
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue