summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 0a73481..be615a4 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -234,7 +234,8 @@ void QWidgetBackingStoreTracker::registerWidget(QWidget *w)
*/
void QWidgetBackingStoreTracker::unregisterWidget(QWidget *w)
{
- if (m_widgets.remove(w) && m_widgets.isEmpty()) {
+ m_widgets.remove(w);
+ if (m_widgets.isEmpty()) {
delete m_ptr;
m_ptr = 0;
}