From 480eeaf650fa05a961d7fd59c1762102cb0edb61 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Mon, 6 Jun 2011 13:52:02 +0200 Subject: 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 --- src/gui/painting/qwindowsurface_qws.cpp | 8 ++++++-- 1 file 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 -- cgit v0.12