summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 0f341fd..ea79329 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -1845,7 +1845,8 @@ void QWidgetPrivate::setMask_sys(const QRegion &region)
OffsetRgn(wr, offset.x(), offset.y());
Q_ASSERT(q->testAttribute(Qt::WA_WState_Created));
- SetWindowRgn(data.winid, wr, true);
+ if (!SetWindowRgn(data.winid, wr, true))
+ DeleteObject(wr);
}
void QWidgetPrivate::updateFrameStrut()