Skip to content

Commit

Permalink
check for NULL in statusbar_more_updated
Browse files Browse the repository at this point in the history
fixes crash due to invalid access of active_win members when the more
indicator is triggered without an active window
  • Loading branch information
ailin-nemui committed Jun 25, 2016
1 parent f264a78 commit c2c32e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fe-text/statusbar-items.c
Expand Up @@ -289,6 +289,10 @@ static void sig_statusbar_more_updated(void)
{
int visible;

/* no active window, for example during /window hide */
if (active_win == NULL)
return;

visible = g_slist_find(more_visible, WINDOW_MAIN(active_win)) != NULL;
if (WINDOW_GUI(active_win)->view->more_text != visible)
statusbar_items_redraw("more");
Expand Down

0 comments on commit c2c32e3

Please sign in to comment.