diff options
-rw-r--r-- | src/fe-common/core/window-items.c | 4 | ||||
-rw-r--r-- | src/fe-common/irc/fe-channels.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/fe-common/core/window-items.c b/src/fe-common/core/window-items.c index b8633461..ba02fd2d 100644 --- a/src/fe-common/core/window-items.c +++ b/src/fe-common/core/window-items.c @@ -71,8 +71,8 @@ void window_remove_item(WINDOW_REC *window, WI_ITEM_REC *item) window->items = g_slist_remove(window->items, item); if (window->active == item) { - window->active = window->items == NULL ? NULL : - window->items->data; + window_item_set_active(window, window->items == NULL ? NULL : + window->items->data); } signal_emit("window item remove", 2, window, item); diff --git a/src/fe-common/irc/fe-channels.c b/src/fe-common/irc/fe-channels.c index 6403412a..272f954c 100644 --- a/src/fe-common/irc/fe-channels.c +++ b/src/fe-common/irc/fe-channels.c @@ -87,7 +87,8 @@ static void sig_disconnected(IRC_SERVER_REC *server) static void signal_window_item_changed(WINDOW_REC *window, WI_ITEM_REC *item) { - g_return_if_fail(item != NULL); + g_return_if_fail(window != NULL); + if (item == NULL) return; if (g_slist_length(window->items) > 1 && irc_item_channel(item)) { printformat(item->server, item->name, MSGLEVEL_CLIENTNOTICE, |