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>
This commit is contained in:
Gunnar Sletta 2012-08-07 11:52:43 +02:00 committed by Qt by Nokia
parent 3cc151d0c2
commit dec934cd96

View File

@ -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]