mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05: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,9 +221,16 @@ static void item_more(SBAR_ITEM_REC *item, int get_size_only)
|
||||
MAIN_WINDOW_REC *mainwin;
|
||||
int visible;
|
||||
|
||||
if (active_win == NULL) {
|
||||
mainwin = NULL;
|
||||
visible = FALSE;
|
||||
} else {
|
||||
mainwin = WINDOW_MAIN(active_win);
|
||||
visible = WINDOW_GUI(active_win)->view->more_text;
|
||||
}
|
||||
|
||||
if (!visible) {
|
||||
if (mainwin != NULL)
|
||||
more_visible = g_slist_remove(more_visible, mainwin);
|
||||
if (get_size_only)
|
||||
item->min_size = item->max_size = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user