mirror of
https://github.com/lubosz/overte.git
synced 2025-04-17 00:57:44 +02:00
Add guards when checking vsync
This commit is contained in:
parent
a34e6773a9
commit
1405daa4ee
1 changed files with 3 additions and 1 deletions
|
@ -50,7 +50,9 @@ void GLWidget::initializeGL() {
|
|||
// TODO: write the proper code for linux
|
||||
makeCurrent();
|
||||
#if defined(Q_OS_WIN)
|
||||
_vsyncSupported = context()->contextHandle()->hasExtension("WGL_EXT_swap_control");;
|
||||
if (isValid() && context() && context()->contextHandle()) {
|
||||
_vsyncSupported = context()->contextHandle()->hasExtension("WGL_EXT_swap_control");;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue