summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2011-06-06 11:52:02 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2011-06-06 11:52:02 (GMT)
commit480eeaf650fa05a961d7fd59c1762102cb0edb61 (patch)
tree611a9b2f4c41fa140fc89c79e97fae3c012e9431 /src
parent2a37227261044d1c737a436c4533295cea1433f5 (diff)
downloadQt-480eeaf650fa05a961d7fd59c1762102cb0edb61.zip
Qt-480eeaf650fa05a961d7fd59c1762102cb0edb61.tar.gz
Qt-480eeaf650fa05a961d7fd59c1762102cb0edb61.tar.bz2
don't delete the lock if it was not created by this surface
and don't forget about it otherwise Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src')
-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