1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

Make sure the more-statusbar item doesn't crash if there's no active window.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2170 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-11-29 23:50:47 +00:00 committed by cras
parent 5d52832efd
commit 6e4b264148

View File

@ -221,10 +221,17 @@ static void item_more(SBAR_ITEM_REC *item, int get_size_only)
MAIN_WINDOW_REC *mainwin;
int visible;
mainwin = WINDOW_MAIN(active_win);
visible = WINDOW_GUI(active_win)->view->more_text;
if (active_win == NULL) {
mainwin = NULL;
visible = FALSE;
} else {
mainwin = WINDOW_MAIN(active_win);
visible = WINDOW_GUI(active_win)->view->more_text;
}
if (!visible) {
more_visible = g_slist_remove(more_visible, mainwin);
if (mainwin != NULL)
more_visible = g_slist_remove(more_visible, mainwin);
if (get_size_only)
item->min_size = item->max_size = 0;
return;