work around calling focus from ctor path. (#1207)

This commit is contained in:
Kyle Reed
2023-06-28 12:50:11 -07:00
committed by GitHub
parent 830fea63ed
commit 7b1541d2e8
3 changed files with 22 additions and 14 deletions

View File

@@ -177,6 +177,8 @@ const std::vector<Widget*>& Widget::children() const {
}
Context& Widget::context() const {
chDbgAssert(parent_, "parent_ is null",
"Check that parent isn't null before deref.");
return parent()->context();
}