widget: don't crash when deallocating in wrong order
[enigma2.git] / lib / gui / ewidget.cpp
index 6f7fa91..3bc6e66 100644 (file)
@@ -140,6 +140,8 @@ void eWidget::hide()
        while (root && !root->m_desktop)
        {
                root = root->m_parent;
+               if (!root)
+                       return;
                abspos += root->position();
        }
        assert(root->m_desktop);