diff options
Diffstat (limited to 'src/gui/painting/qwindowsurface_s60.cpp')
-rw-r--r-- | src/gui/painting/qwindowsurface_s60.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index d4dcf7d..eb9eff2 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -102,9 +102,11 @@ QS60WindowSurface::~QS60WindowSurface() // Issue empty redraw to clear the UI surface QWidget *w = window(); - RWindow *const window = static_cast<RWindow *>(w->winId()->DrawableWindow()); - window->BeginRedraw(); - window->EndRedraw(); + if (w->testAttribute(Qt::WA_WState_Created)) { + RWindow *const window = static_cast<RWindow *>(w->winId()->DrawableWindow()); + window->BeginRedraw(); + window->EndRedraw(); + } } } #endif |