From 7b85afedecdd0801d6a4414c6ef6a24467b2668c Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Thu, 18 Nov 2010 10:24:58 -0700 Subject: [PATCH] ensure that sa_sigaction is non-null before attempting to call it --- src/posix.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/posix.cpp b/src/posix.cpp index da0397c107..e5ec88b0a1 100644 --- a/src/posix.cpp +++ b/src/posix.cpp @@ -874,7 +874,9 @@ handleSignal(int signal, siginfo_t* info, void* context) default: abort(); } - if (system->oldHandlers[index].sa_flags & SA_SIGINFO) { + if (system->oldHandlers[index].sa_flags & SA_SIGINFO + and system->oldHandlers[index].sa_sigaction) + { system->oldHandlers[index].sa_sigaction(signal, info, context); } else if (system->oldHandlers[index].sa_handler) { system->oldHandlers[index].sa_handler(signal);