1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Merge pull request #86843 from RandomShaper/fix_null_ptr

Avoid several null-dereferences of ApiContextRD
This commit is contained in:
Rémi Verschelde
2024-02-07 10:58:01 +01:00
4 changed files with 14 additions and 7 deletions

View File

@@ -6080,10 +6080,11 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
if (context_rd) {
if (context_rd->initialize() != OK) {
ERR_PRINT(vformat("Could not initialize %s", context_rd->get_api_name()));
memdelete(context_rd);
context_rd = nullptr;
r_error = ERR_CANT_CREATE;
ERR_FAIL_MSG(vformat("Could not initialize %s", context_rd->get_api_name()));
return;
}
driver_found = true;
}