mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
added destroy() function to WI_ITEM_REC. This fixes a potential crash when
"window item destroy" signal was being used. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1655 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
219d276b0a
commit
3fb7a4115d
7 changed files with 22 additions and 52 deletions
|
|
@ -66,7 +66,7 @@ void window_item_remove(WI_ITEM_REC *item)
|
|||
|
||||
window = window_item_window(item);
|
||||
|
||||
if (g_slist_find(window->items, item) == NULL)
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
item->window = NULL;
|
||||
|
|
@ -86,8 +86,7 @@ void window_item_destroy(WI_ITEM_REC *item)
|
|||
|
||||
window = window_item_window(item);
|
||||
window_item_remove(item);
|
||||
|
||||
signal_emit("window item destroy", 2, window, item);
|
||||
item->destroy(item);
|
||||
}
|
||||
|
||||
void window_item_change_server(WI_ITEM_REC *item, void *server)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue