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:
commit
b9cd8d23a4
1 changed files with 7 additions and 0 deletions
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…
Reference in a new issue