You've already forked godot
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user