if (_visible)
hide();
+ if (_surface)
+ delete _surface;
+
_event_dispatcher->clearHandler(_window);
std::for_each(_children.begin(), _children.end(), PointerAssassin());
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)