diff --git a/Source/Widgets/ctui_widget.cpp b/Source/Widgets/ctui_widget.cpp index f1ebe3a..9421efe 100644 --- a/Source/Widgets/ctui_widget.cpp +++ b/Source/Widgets/ctui_widget.cpp @@ -14,9 +14,9 @@ namespace ctui return _absolute_bounds; } - const Widget& Widget::get_parent() const + const Widget* Widget::get_parent() const { - return *_parent; + return _parent; } void Widget::set_parent(Container* parent_ptr) diff --git a/Source/Widgets/ctui_widget.h b/Source/Widgets/ctui_widget.h index 71153bd..29ce240 100644 --- a/Source/Widgets/ctui_widget.h +++ b/Source/Widgets/ctui_widget.h @@ -51,7 +51,7 @@ namespace ctui { [[nodiscard]] const Rect& get_relative_bounds() const; [[nodiscard]] const Rect& get_absolute_bounds() const; - [[nodiscard]] const Widget& get_parent() const; + [[nodiscard]] const Widget* get_parent() const; void set_parent(Container* parent_ptr);