summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2009-08-07 13:24:32 (GMT)
committermread <qt-info@nokia.com>2009-08-07 13:24:32 (GMT)
commit2bdc65c043237c53eaeb0068d558d2ea6e47354f (patch)
tree28e8f81fd7ada737760a30cd4a50e43c684b31bb /src
parent4fe95c758d684ad7511eafc2777d5a3176a2334a (diff)
downloadQt-2bdc65c043237c53eaeb0068d558d2ea6e47354f.zip
Qt-2bdc65c043237c53eaeb0068d558d2ea6e47354f.tar.gz
Qt-2bdc65c043237c53eaeb0068d558d2ea6e47354f.tar.bz2
replacing assert with recovery for begin/end paint lock for exception compatability
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp8
1 files 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();