pass border to kill function as expected and don't kill anything if a non-border object was passed

ticket #1769


SVN revision: 79206
This commit is contained in:
Mike Blumenkrantz 2012-11-13 08:39:45 +00:00
parent b9446430c8
commit 4a4f40215e
2 changed files with 2 additions and 6 deletions

View File

@ -344,11 +344,7 @@ ACT_FN_GO(window_kill, __UNUSED__)
if (!obj) obj = E_OBJECT(e_border_focused_get());
if (!obj) return;
if (obj->type != E_BORDER_TYPE)
{
obj = E_OBJECT(e_border_focused_get());
if (!obj) return;
}
if (obj->type != E_BORDER_TYPE) return;
bd = (E_Border *)obj;
if ((bd->lock_close) || (bd->internal)) return;

View File

@ -326,7 +326,7 @@ _e_border_menu_cb_kill(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSE
if ((bd->lock_close) || (bd->internal)) return;
a = e_action_find("window_kill");
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
if ((a) && (a->func.go)) a->func.go(E_OBJECT(bd), NULL);
}
static void