diff --git a/src/plugins/qpa/eglplatformcontext.cpp b/src/plugins/qpa/eglplatformcontext.cpp index b19f20aab5..5f527149c1 100644 --- a/src/plugins/qpa/eglplatformcontext.cpp +++ b/src/plugins/qpa/eglplatformcontext.cpp @@ -162,7 +162,7 @@ void EGLPlatformContext::swapBuffers(QPlatformSurface *surface) GLuint EGLPlatformContext::defaultFramebufferObject(QPlatformSurface *surface) const { - if (Window *window = dynamic_cast(surface)) { + if (surface->surface()->surfaceClass() == QSurface::Window) { if (m_current) { return m_current->fbo->handle(); }