diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-02-14 16:10:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-14 16:10:25 +0100 |
commit | acb9f5008119eb6f9d7ca35d78e42ee8240501a8 (patch) | |
tree | e33aa0970319124fda445bc62648f0133b06a46c /platform | |
parent | 4a24ba6e77c7128e64dee31cf05f6960abdb8108 (diff) | |
parent | e3aa67792c86c690c391d97f4aedc3fae4ecef63 (diff) |
Merge pull request #25878 from hpvb/fix-25852
Don't crash if there's no application name
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/os_x11.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index ca4b02bb49..9d5f38cea2 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -3017,7 +3017,12 @@ void OS_X11::set_context(int p_context) { if (p_context == CONTEXT_ENGINE) { classHint->res_name = (char *)"Godot_Engine"; - config_name = strdup((char *)((String)GLOBAL_GET("application/config/name")).utf8().ptrw()); + char *config_name_tmp = (char *)((String)GLOBAL_GET("application/config/name")).utf8().ptrw(); + if (config_name_tmp) + config_name = strdup(config_name_tmp); + else + config_name = strdup("Godot Engine"); + wm_class = config_name; } |