mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-22 16:02:54 +02:00
Fix crash on Component::IsFocused if the component has been detached from the Window
This commit is contained in:
@@ -113,7 +113,9 @@ void Component::TextPosition(std::string displayText)
|
||||
|
||||
bool Component::IsFocused() const
|
||||
{
|
||||
return parentstate_->IsFocused(this);
|
||||
if(parentstate_)
|
||||
return parentstate_->IsFocused(this);
|
||||
return false;
|
||||
}
|
||||
|
||||
void Component::SetParentWindow(Window* window)
|
||||
|
Reference in New Issue
Block a user