mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Merge pull request #22415 from ibrahn/fix-late-segfault-hang
Fixed hang when segfaulting after OS object destroyed (OSX and X11)
This commit is contained in:
commit
cac3f44f6e
@ -68,8 +68,9 @@ static uint64_t load_address() {
|
||||
}
|
||||
|
||||
static void handle_crash(int sig) {
|
||||
if (OS::get_singleton() == NULL)
|
||||
return;
|
||||
if (OS::get_singleton() == NULL) {
|
||||
abort();
|
||||
}
|
||||
|
||||
void *bt_buffer[256];
|
||||
size_t size = backtrace(bt_buffer, 256);
|
||||
@ -151,6 +152,7 @@ CrashHandler::CrashHandler() {
|
||||
}
|
||||
|
||||
CrashHandler::~CrashHandler() {
|
||||
disable();
|
||||
}
|
||||
|
||||
void CrashHandler::disable() {
|
||||
|
@ -45,8 +45,9 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
static void handle_crash(int sig) {
|
||||
if (OS::get_singleton() == NULL)
|
||||
return;
|
||||
if (OS::get_singleton() == NULL) {
|
||||
abort();
|
||||
}
|
||||
|
||||
void *bt_buffer[256];
|
||||
size_t size = backtrace(bt_buffer, 256);
|
||||
@ -119,6 +120,7 @@ CrashHandler::CrashHandler() {
|
||||
}
|
||||
|
||||
CrashHandler::~CrashHandler() {
|
||||
disable();
|
||||
}
|
||||
|
||||
void CrashHandler::disable() {
|
||||
|
Loading…
Reference in New Issue
Block a user