mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -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:
parent
5d52832efd
commit
6e4b264148
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user