From 32c94e07760cdd9c40caea6e32566ef8c885fb29 Mon Sep 17 00:00:00 2001 From: tobid7 Date: Sat, 5 Sep 2026 17:02:58 +0200 Subject: [PATCH] fix random garbage ptr issues --- include/pd/ui7/container/coloredit.hpp | 2 +- include/pd/ui7/container/container.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/pd/ui7/container/coloredit.hpp b/include/pd/ui7/container/coloredit.hpp index 5985a84..db00652 100755 --- a/include/pd/ui7/container/coloredit.hpp +++ b/include/pd/ui7/container/coloredit.hpp @@ -68,7 +68,7 @@ class PD_API ColorEdit : public Container { u32* color_ref = nullptr; ///< Color Reference u32 initial_color; ///< Initial Color std::string label; ///< Label of the Button - Layout* layout; ///< Layout to open + Layout* layout = nullptr; ///< Layout to open bool is_shown = false; ///< AHow Layout Editor }; } // namespace UI7 diff --git a/include/pd/ui7/container/container.hpp b/include/pd/ui7/container/container.hpp index 44a9e9d..a7d0a64 100644 --- a/include/pd/ui7/container/container.hpp +++ b/include/pd/ui7/container/container.hpp @@ -155,11 +155,11 @@ class PD_API Container { /** Container Size*/ fvec2 size; /** Reference to the Drawlist to Draw to*/ - Li::Drawlist* list; + Li::Drawlist* list = nullptr; /** IO Reference for Renderer and Theme */ - UI7::IO* io; + UI7::IO* io = nullptr; /** Reference to the parent container*/ - Container* parent; + Container* parent = nullptr; /** Object ID (0 if unused)*/ u32 id = 0; /** Internal Flags */