summaryrefslogtreecommitdiff
path: root/platform/x11/crash_handler_x11.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-05-23 21:40:06 +0200
committerGitHub <noreply@github.com>2019-05-23 21:40:06 +0200
commit9738ed567cb9b75e11af3d7c361a2d77e60a5753 (patch)
tree67dc51d53fefe6588b04a741ac99c0b7bb0c6d99 /platform/x11/crash_handler_x11.cpp
parent7c73a741f3bb1fd598b6443cb9f8d8e10fb9f36f (diff)
parent63068e2ccddfebbec14b806af244daa4cb4d65a8 (diff)
Merge pull request #29134 from ibrahn/fix-crashhandler-msg-lookup
Check project settings live before lookup in crash handler
Diffstat (limited to 'platform/x11/crash_handler_x11.cpp')
-rw-r--r--platform/x11/crash_handler_x11.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/x11/crash_handler_x11.cpp b/platform/x11/crash_handler_x11.cpp
index 44d3cf1910..ca7251078f 100644
--- a/platform/x11/crash_handler_x11.cpp
+++ b/platform/x11/crash_handler_x11.cpp
@@ -53,7 +53,12 @@ static void handle_crash(int sig) {
void *bt_buffer[256];
size_t size = backtrace(bt_buffer, 256);
String _execpath = OS::get_singleton()->get_executable_path();
- String msg = GLOBAL_GET("debug/settings/crash_handler/message");
+
+ String msg;
+ const ProjectSettings *proj_settings = ProjectSettings::get_singleton();
+ if (proj_settings) {
+ msg = proj_settings->get("debug/settings/crash_handler/message");
+ }
// Dump the backtrace to stderr with a message to the user
fprintf(stderr, "%s: Program crashed with signal %d\n", __FUNCTION__, sig);