]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed bug in signal handling.
authorMartin Mares <mj@ucw.cz>
Fri, 15 Dec 2006 15:01:36 +0000 (16:01 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 15 Dec 2006 15:01:36 +0000 (16:01 +0100)
lib/sighandler.c

index 4991f9a3379b080fb0681cac303c24abdf138125..2739ba10304023114abe01dcfa8226b2a67b7e35 100644 (file)
@@ -19,7 +19,7 @@ static void
 signal_handler_internal(int sig)
 {
   struct ucwlib_context *ctx = ucwlib_thread_context();
-  if (!ctx->signal_handlers[sig] || ctx->signal_handlers[sig](sig))
+  if (!ctx->signal_handlers || !ctx->signal_handlers[sig] || ctx->signal_handlers[sig](sig))
     abort();
 }