summaryrefslogtreecommitdiff
path: root/src/openvg/qwindowsurface_vgegl_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-07-18 11:53:06 +0300
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-07-18 13:08:18 +0300
commit4e910f7d00dc3a08a2ac8578ecc8e0284b407bb9 (patch)
tree7d28e120ce3c700cfe5baa9522a007b1408f53b2 /src/openvg/qwindowsurface_vgegl_p.h
parentb05a513e1427dacc4c3de1b6d507616764248b96 (diff)
downloadqt4-tools-4e910f7d00dc3a08a2ac8578ecc8e0284b407bb9.tar.gz
Avoid crash when surface creation fails.
When the creation of the EGL window surface failed, the paint engine was not destroyed in the openvg module's window surface implementation. This led to accessing an obsolete engine instance later on in QSymbianControl::Draw, leading to a crash. Now a new, proper engine will be created, naturally the painting will still fail, but the application will not crash. Task-number: QTBUG-20339 Reviewed-by: Jani Hautakangas
Diffstat (limited to 'src/openvg/qwindowsurface_vgegl_p.h')
-rw-r--r--src/openvg/qwindowsurface_vgegl_p.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/openvg/qwindowsurface_vgegl_p.h b/src/openvg/qwindowsurface_vgegl_p.h
index 231c5488a9..2226e2838e 100644
--- a/src/openvg/qwindowsurface_vgegl_p.h
+++ b/src/openvg/qwindowsurface_vgegl_p.h
@@ -80,10 +80,8 @@ public:
virtual bool supportsStaticContents() const { return false; }
virtual bool scroll(QWidget *, const QRegion&, int, int) { return false; }
-private:
- QVGPaintEngine *engine;
-
protected:
+ QVGPaintEngine *engine;
QWindowSurface *winSurface;
void destroyPaintEngine();