You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
This commit is contained in:
@@ -66,7 +66,7 @@ private:
|
||||
struct GLDisplay {
|
||||
GLDisplay() { context = nullptr; }
|
||||
~GLDisplay();
|
||||
GLManager_X11_Private *context;
|
||||
GLManager_X11_Private *context = nullptr;
|
||||
::Display *x11_display;
|
||||
XVisualInfo x_vi;
|
||||
XSetWindowAttributes x_swa;
|
||||
@@ -82,7 +82,7 @@ private:
|
||||
LocalVector<GLWindow> _windows;
|
||||
LocalVector<GLDisplay> _displays;
|
||||
|
||||
GLWindow *_current_window;
|
||||
GLWindow *_current_window = nullptr;
|
||||
|
||||
void _internal_set_current_window(GLWindow *p_win);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user