Mercurial > hg
comparison mcabber/mcabber/main.c @ 1995:7f7c6b87f1b1
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/
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 16 Apr 2011 09:25:21 +0200 |
parents | 2256d0626730 |
children | 0cb8ea02e472 |
comparison
equal
deleted
inserted
replaced
1994:024bdd1c6418 | 1995:7f7c6b87f1b1 |
---|---|
118 mcabber_terminate("Killed by SIGTERM"); | 118 mcabber_terminate("Killed by SIGTERM"); |
119 } else if (signum == SIGINT) { | 119 } else if (signum == SIGINT) { |
120 mcabber_terminate("Killed by SIGINT"); | 120 mcabber_terminate("Killed by SIGINT"); |
121 #ifdef USE_SIGWINCH | 121 #ifdef USE_SIGWINCH |
122 } else if (signum == SIGWINCH) { | 122 } else if (signum == SIGWINCH) { |
123 ungetch(KEY_RESIZE); | 123 if (scr_curses_status()) |
124 ungetch(KEY_RESIZE); | |
124 #endif | 125 #endif |
125 } else { | 126 } else { |
126 scr_LogPrint(LPRINT_LOGNORM, "Caught signal: %d", signum); | 127 scr_LogPrint(LPRINT_LOGNORM, "Caught signal: %d", signum); |
127 } | 128 } |
128 } | 129 } |