You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 17:36:07 +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:
@@ -40,7 +40,7 @@
|
||||
class StyleBoxPreview : public VBoxContainer {
|
||||
GDCLASS(StyleBoxPreview, VBoxContainer);
|
||||
|
||||
Control *preview;
|
||||
Control *preview = nullptr;
|
||||
Ref<StyleBox> stylebox;
|
||||
|
||||
void _sb_changed();
|
||||
|
||||
Reference in New Issue
Block a user