qt5: fix possible crash in QPA plugin

Fixes #1793
This commit is contained in:
Christian Prochaska 2015-11-18 20:37:56 +01:00 committed by Christian Helmuth
parent 2c558de891
commit 1081af930d

View File

@ -34,6 +34,9 @@ QNitpickerWindowSurface::QNitpickerWindowSurface(QWindow *window)
{
//qDebug() << "QNitpickerWindowSurface::QNitpickerWindowSurface:" << (long)this;
/* Calling 'QWindow::winId()' ensures that the platform window has been created */
window->winId();
_platform_window = static_cast<QNitpickerPlatformWindow*>(window->handle());
connect(_platform_window, SIGNAL(framebuffer_changed()), this, SLOT(framebuffer_changed()));
}