catch buggy python code
authorFelix Domke <tmbinc@elitedvb.net>
Mon, 3 Apr 2006 12:00:39 +0000 (12:00 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Mon, 3 Apr 2006 12:00:39 +0000 (12:00 +0000)
lib/gui/ewidget.cpp

index 3bc6e663841e940e1d7506f7baf4722c90f01a24..cbc1a8c05f8e9b9687df89820c671d52714f3eda 100644 (file)
@@ -100,16 +100,25 @@ void eWidget::show()
 {
        if (m_vis & wVisShow)
                return;
-       
-       m_vis |=  wVisShow;
 
+       m_vis |= wVisShow;
+       
                /* TODO: optimize here to only recalc what's required. possibly merge with hide. */
        eWidget *root = this;
        ePoint abspos = position();
        while (root && !root->m_desktop)
        {
                root = root->m_parent;
-               assert(root);
+               if (root)
+               {
+                               /* oops: our root widget does not have a desktop associated. 
+                                       probably somebody already erased the root, but tries some
+                                       operations on a child window. 
+                                       
+                                       ignore them for now. */
+                       /* assert(root); */
+                       return;
+               }
                abspos += root->position();
        }