diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2012-06-24 14:33:54 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2012-06-24 14:33:54 +0000 |
commit | 02aa2682dcd6de0defcdc88756dd92e25ae268a4 (patch) | |
tree | 826dcd0914a63f5d36792caf031ea24f335f3d5c /src | |
parent | 7ae491922905fbc800c6c389517a5fbcce6f5734 (diff) | |
download | irssi-02aa2682dcd6de0defcdc88756dd92e25ae268a4.zip |
Fix crash in mainwindows_resize_smaller when the 'mainwindows' list is empty.
The crash can happen if the terminal height decreases before the first window
is created. Based on a patch by Jaroslav Škarvada (red hat bug #796457).
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5217 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-text/mainwindows.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c index 6cb567cc..5f58c25f 100644 --- a/src/fe-text/mainwindows.c +++ b/src/fe-text/mainwindows.c @@ -355,6 +355,9 @@ static void mainwindows_resize_smaller(int xdiff, int ydiff) int space; sorted = mainwindows_get_sorted(TRUE); + if (sorted == NULL) + return; + for (;;) { space = 0; for (tmp = mainwindows; tmp != NULL; tmp = tmp->next) { |