Report failure to install the SIGSEGV handler correctly

This commit is contained in:
gbeauche 2003-10-12 21:21:35 +00:00
parent cf3d36a3a7
commit 006f72c9fe

View File

@ -384,8 +384,11 @@ int main(int argc, char **argv)
QuitEmulator();
// Install the handler for SIGSEGV
if (!sigsegv_install_handler(sigsegv_handler))
return false;
if (!sigsegv_install_handler(sigsegv_handler)) {
sprintf(str, GetString(STR_SIG_INSTALL_ERR), "SIGSEGV", strerror(errno));
ErrorAlert(str);
QuitEmulator();
}
// Register dump state function when we got mad after a segfault
sigsegv_set_dump_state(sigsegv_dump_state);