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/
--- 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);