summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/painting/qwindowsurface_qws.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/painting/qwindowsurface_qws.cpp b/src/gui/painting/qwindowsurface_qws.cpp
index c52f864..98de8d1 100644
--- a/src/gui/painting/qwindowsurface_qws.cpp
+++ b/src/gui/painting/qwindowsurface_qws.cpp
@@ -806,6 +806,10 @@ QWSMemorySurface::QWSMemorySurface(QWidget *w)
QWSMemorySurface::~QWSMemorySurface()
{
+#ifndef QT_NO_QWS_MULTIPROCESS
+ if (memlock != QWSDisplay::Data::getClientLock())
+ delete memlock;
+#endif
}
@@ -852,9 +856,9 @@ void QWSMemorySurface::setLock(int lockId)
{
if (memlock && memlock->id() == lockId)
return;
- delete memlock;
+ if (memlock != QWSDisplay::Data::getClientLock())
+ delete memlock;
memlock = (lockId == -1 ? 0 : new QWSLock(lockId));
- return;
}
#endif // QT_NO_QWS_MULTIPROCESS