Fix potential NULL pointer access

This commit is contained in:
Raphael Coeffic
2021-06-14 06:31:28 +02:00
parent 7c88dfd762
commit b53982eebe
+2 -3
View File
@@ -53,10 +53,9 @@ Window::~Window()
void Window::attach(Window * newParent)
{
if (parent)
detach();
if (parent) detach();
parent = newParent;
newParent->addChild(this);
if (newParent) newParent->addChild(this);
}
void Window::detach()