]> Dogcows Code - chaz/openbox/blobdiff - otk/widget.cc
not needed, the .in is commited
[chaz/openbox] / otk / widget.cc
index c3e17cbe5a181cdcefd8bd97b7c6cceb771348be..c09ac4862566e8c8f93d0f4634ff6e7e33a15065 100644 (file)
@@ -277,7 +277,8 @@ void Widget::render(void)
 
   XSetWindowBackgroundPixmap(**display, _window, _surface->pixmap());
 
-  delete s; // delete the old surface *after* its pixmap isn't in use anymore
+  if (s)
+    delete s; // delete the old surface *after* its pixmap isn't in use anymore
 }
 
 void Widget::adjust(void)
@@ -403,16 +404,16 @@ void Widget::adjustVert(void)
 
 void Widget::update()
 {
+  WidgetList::iterator it = _children.begin(), end = _children.end();
+  for (; it != end; ++it)
+    (*it)->update();
+
   if (_dirty) {
     adjust();
     render();
     XClearWindow(**display, _window);
   }
 
-  WidgetList::iterator it = _children.begin(), end = _children.end();
-  for (; it != end; ++it)
-    (*it)->update();
-
   _dirty = false;
 }
 
This page took 0.021141 seconds and 4 git commands to generate.