summaryrefslogtreecommitdiffstats
path: root/examples/gui/rasterwindow/rasterwindow.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2012-08-07 11:52:43 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-08 12:04:49 +0200
commitdec934cd967335898f8dbd9beb24c28833b6294e (patch)
treeed5e6467f4cc687ffe6a5abc7397fbaeb02b44de /examples/gui/rasterwindow/rasterwindow.cpp
parent3cc151d0c2a8ad51f014222acd776c4f3368cd84 (diff)
Avoid potential crash.
The setGeometry call triggers a resizeEvent() so make sure the backing store is created before that. Change-Id: I26aa3ef6c0515311e3ca21f938a92ca1a20d0030 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'examples/gui/rasterwindow/rasterwindow.cpp')
-rw-r--r--examples/gui/rasterwindow/rasterwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/gui/rasterwindow/rasterwindow.cpp b/examples/gui/rasterwindow/rasterwindow.cpp
index e999ed92b1..9424a90b95 100644
--- a/examples/gui/rasterwindow/rasterwindow.cpp
+++ b/examples/gui/rasterwindow/rasterwindow.cpp
@@ -45,11 +45,11 @@ RasterWindow::RasterWindow(QWindow *parent)
: QWindow(parent)
, m_update_pending(false)
{
+ m_backingStore = new QBackingStore(this);
create();
setGeometry(100, 100, 300, 200);
- m_backingStore = new QBackingStore(this);
}
//! [1]