1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

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
This commit is contained in:
Emanuele Giaquinta 2012-06-24 14:33:54 +00:00 committed by exg
parent 7ae4919229
commit 02aa2682dc

View File

@ -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) {