# HG changeset patch # User Mikael Berthe # Date 1302938721 -7200 # Node ID 7f7c6b87f1b1f4e63bb4083f3c5feb3ec0d740f0 # Parent 024bdd1c64180097977aa5990fcd72245e2958b6 Fix segfault with SIGWINCH This patch should fix issue #73: When the program is built with "--enable-sigwinch" a segmentation fault may occur if the size of a window is changed before a password is entered. https://bitbucket.org/McKael/mcabber-crew/issue/73/ diff -r 024bdd1c6418 -r 7f7c6b87f1b1 mcabber/mcabber/main.c --- a/mcabber/mcabber/main.c Wed Mar 30 22:02:48 2011 +0200 +++ b/mcabber/mcabber/main.c Sat Apr 16 09:25:21 2011 +0200 @@ -120,7 +120,8 @@ mcabber_terminate("Killed by SIGINT"); #ifdef USE_SIGWINCH } else if (signum == SIGWINCH) { - ungetch(KEY_RESIZE); + if (scr_curses_status()) + ungetch(KEY_RESIZE); #endif } else { scr_LogPrint(LPRINT_LOGNORM, "Caught signal: %d", signum);