diff --git a/modules/juce_core/system/juce_SystemStats.cpp b/modules/juce_core/system/juce_SystemStats.cpp index 1dc8bde385..72c37b755e 100644 --- a/modules/juce_core/system/juce_SystemStats.cpp +++ b/modules/juce_core/system/juce_SystemStats.cpp @@ -155,15 +155,15 @@ String SystemStats::getStackBacktrace() static SystemStats::CrashHandlerFunction globalCrashHandler = nullptr; #if JUCE_WINDOWS -static LONG WINAPI handleCrash (LPEXCEPTION_POINTERS) +static LONG WINAPI handleCrash (LPEXCEPTION_POINTERS ep) { - globalCrashHandler(); + globalCrashHandler (ep); return EXCEPTION_EXECUTE_HANDLER; } #else -static void handleCrash (int) +static void handleCrash (int signum) { - globalCrashHandler(); + globalCrashHandler ((void*) (pointer_sized_int) signum); kill (getpid(), SIGKILL); } diff --git a/modules/juce_core/system/juce_SystemStats.h b/modules/juce_core/system/juce_SystemStats.h index 6f29412b0d..11cec7217c 100644 --- a/modules/juce_core/system/juce_SystemStats.h +++ b/modules/juce_core/system/juce_SystemStats.h @@ -192,8 +192,10 @@ public: */ static String getStackBacktrace(); - /** A void() function type, used by setApplicationCrashHandler(). */ - typedef void (*CrashHandlerFunction)(); + /** A function type for use in setApplicationCrashHandler(). The parameter will contain + platform-specific data about the crash. + */ + typedef void (*CrashHandlerFunction) (void*); /** Sets up a global callback function that will be called if the application executes some kind of illegal instruction.