From 2bdc65c043237c53eaeb0068d558d2ea6e47354f Mon Sep 17 00:00:00 2001 From: mread Date: Fri, 7 Aug 2009 14:24:32 +0100 Subject: replacing assert with recovery for begin/end paint lock for exception compatability --- src/gui/painting/qwindowsurface_s60.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index 5de4317..fd2c4c4 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -85,8 +85,8 @@ QS60WindowSurface::QS60WindowSurface(QWidget* widget) QS60WindowSurface::~QS60WindowSurface() { - // Ensure that locking and unlocking of this surface were symmetrical - Q_ASSERT(QS60WindowSurfacePrivate::lockedSurface != this); + if (QS60WindowSurfacePrivate::lockedSurface == this) + unlockBitmapHeap(); delete d_ptr->bitmap; delete d_ptr; @@ -97,7 +97,9 @@ void QS60WindowSurface::beginPaint(const QRegion &rgn) if(!d_ptr->bitmap) return; - Q_ASSERT(!QS60WindowSurfacePrivate::lockedSurface); + if (QS60WindowSurfacePrivate::lockedSurface) + unlockBitmapHeap(); + QS60WindowSurfacePrivate::lockedSurface = this; lockBitmapHeap(); -- cgit v0.12