Fix crash on Component::IsFocused if the component has been detached from the Window
This commit is contained in:
parent
90ad1fd856
commit
716ac44c29
@ -113,7 +113,9 @@ void Component::TextPosition(std::string displayText)
|
|||||||
|
|
||||||
bool Component::IsFocused() const
|
bool Component::IsFocused() const
|
||||||
{
|
{
|
||||||
return parentstate_->IsFocused(this);
|
if(parentstate_)
|
||||||
|
return parentstate_->IsFocused(this);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Component::SetParentWindow(Window* window)
|
void Component::SetParentWindow(Window* window)
|
||||||
|
Loading…
Reference in New Issue
Block a user