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).