Fix OnEvent being called on Empty containers.

This commit is contained in:
ArthurSonzogni 2020-05-25 01:35:22 +02:00 committed by Arthur Sonzogni
parent ede49fd5e7
commit 823e0906da

View File

@ -37,7 +37,7 @@ bool Container::OnEvent(Event event) {
if (!Focused())
return false;
if (ActiveChild()->OnEvent(event))
if (ActiveChild() && ActiveChild()->OnEvent(event))
return true;
return (this->*event_handler_)(event);