Merge pull request #50301 from likeich/master

Fix use after free in Free desktop screensaver::inhibit()
This commit is contained in:
Rémi Verschelde 2021-07-09 08:07:13 +02:00 committed by GitHub
commit fb4b73ff0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,8 @@ void FreeDesktopScreenSaver::inhibit() {
}
String app_name_string = ProjectSettings::get_singleton()->get("application/config/name");
const char *app_name = app_name_string.is_empty() ? "Godot Engine" : app_name_string.utf8().get_data();
CharString app_name_utf8 = app_name_string.utf8();
const char *app_name = app_name_string.is_empty() ? "Godot Engine" : app_name_utf8.get_data();
const char *reason = "Running Godot Engine project";