diff options
Diffstat (limited to 'src/interface/Component.cpp')
| -rw-r--r-- | src/interface/Component.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interface/Component.cpp b/src/interface/Component.cpp index ac66f92..49ff7f8 100644 --- a/src/interface/Component.cpp +++ b/src/interface/Component.cpp @@ -76,7 +76,8 @@ void Component::SetParent(Panel* new_parent) else { // remove from parent state (if in parent state) and place in new parent - GetParentState()->RemoveComponent(this); + if(GetParentState()) + GetParentState()->RemoveComponent(this); new_parent->children.push_back(this); } this->_parent = new_parent; |
