You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[X11] Fix GL init memory leak when transparency is enabled.
This commit is contained in:
@@ -137,6 +137,10 @@ Error GLManager_X11::_create_context(GLDisplay &gl_display) {
|
|||||||
ERR_FAIL_NULL_V(fbc, ERR_UNCONFIGURED);
|
ERR_FAIL_NULL_V(fbc, ERR_UNCONFIGURED);
|
||||||
|
|
||||||
for (int i = 0; i < fbcount; i++) {
|
for (int i = 0; i < fbcount; i++) {
|
||||||
|
if (vi) {
|
||||||
|
XFree(vi);
|
||||||
|
vi = nullptr;
|
||||||
|
}
|
||||||
vi = (XVisualInfo *)glXGetVisualFromFBConfig(x11_display, fbc[i]);
|
vi = (XVisualInfo *)glXGetVisualFromFBConfig(x11_display, fbc[i]);
|
||||||
if (!vi) {
|
if (!vi) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user