Don't create a platform window if we already have one.

(cherry picked from commit c4dea497adc36a0be840a51c9b98177f1f4b65b2)
This commit is contained in:
Samuel Rødal 2011-04-27 09:38:54 +02:00
parent 02d44966ba
commit 96b872506a

View File

@ -116,7 +116,8 @@ void QWindow::setVisible(bool visible)
void QWindow::create()
{
Q_D(QWindow);
d->platformWindow = QApplicationPrivate::platformIntegration()->createPlatformWindow(this);
if (!d->platformWindow)
d->platformWindow = QApplicationPrivate::platformIntegration()->createPlatformWindow(this);
Q_ASSERT(d->platformWindow);
}