1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 09:15:38 +00:00

Merge branch 'cs-crash-on-exit-fix' into 'master'

Stop the CS crashing on exit - Close graphics context while it still exists

See merge request OpenMW/openmw!182
This commit is contained in:
psi29a 2020-05-02 10:25:59 +00:00
commit b9cd8d23a4

View file

@ -119,6 +119,13 @@ bool GLWidget::event( QEvent* event )
enqueueDeferredEvent(QEvent::ParentChange);
return true;
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
else if (event->type() == QEvent::PlatformSurface && static_cast<QPlatformSurfaceEvent*>(event)->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed)
{
if (_gw)
_gw->close();
}
#endif
// perform regular event handling
return QGLWidget::event( event );