diff --git a/src/interface/Component.cpp b/src/interface/Component.cpp index 3c52ed9dc..e4c681157 100644 --- a/src/interface/Component.cpp +++ b/src/interface/Component.cpp @@ -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)