mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-16 08:42:23 +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:
commit
b9cd8d23a4
7
extern/osgQt/GraphicsWindowQt.cpp
vendored
7
extern/osgQt/GraphicsWindowQt.cpp
vendored
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user