You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #26962 from ibrahn/small-x11setcontext-fix
fix for access after free in OS_X11::set_context.
This commit is contained in:
@@ -3048,11 +3048,12 @@ void OS_X11::set_context(int p_context) {
|
|||||||
|
|
||||||
if (p_context == CONTEXT_ENGINE) {
|
if (p_context == CONTEXT_ENGINE) {
|
||||||
classHint->res_name = (char *)"Godot_Engine";
|
classHint->res_name = (char *)"Godot_Engine";
|
||||||
char *config_name_tmp = (char *)((String)GLOBAL_GET("application/config/name")).utf8().ptrw();
|
String config_name_tmp = GLOBAL_GET("application/config/name");
|
||||||
if (config_name_tmp)
|
if (config_name_tmp.length() > 0) {
|
||||||
config_name = strdup(config_name_tmp);
|
config_name = strdup(config_name_tmp.utf8().get_data());
|
||||||
else
|
} else {
|
||||||
config_name = strdup("Godot Engine");
|
config_name = strdup("Godot Engine");
|
||||||
|
}
|
||||||
|
|
||||||
wm_class = config_name;
|
wm_class = config_name;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user