mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04: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:
parent
7ae4919229
commit
02aa2682dc
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user