You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Widget::get_parent() dereferences nullptr for the root Screen #24
_parent is set to nullptr in the Widget() constructor and never overwritten for the Screen singleton (it's the root, has no parent). Calling get_parent() on screen (or any orphaned widget) dereferences a null pointer through a reference — UB.
Suggested fix: either guard/assert for the root case, or change the return type to something that can represent "no parent" (Widget*/std::optional<std::reference_wrapper<Widget>>).
Activity
Aintdev commentedon Sep 14, 2026
plan is to let get_parent() return pointer instead of reference to make it more safe without removing the method from screen.