diff options
author | WaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com> | 2021-01-24 15:44:05 +0000 |
---|---|---|
committer | WaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com> | 2021-01-24 15:44:05 +0000 |
commit | 536902d61088f10acfb4deb38a17ac6f2badc3d3 (patch) | |
tree | 289c79171d46d073a3b59364eba261b13fce98b2 /src | |
parent | 9994d3a6441c6fa7e7c4b7c2557db501f8961b6f (diff) |
Fix crash if OpenGL version is lower than requirements
Diffstat (limited to 'src')
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index a908980..baa4716 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -1386,10 +1386,13 @@ void MainWindow::createScreenPanel() if (!hasOGL) delete panelGL; - panel = panelGL; - panelGL->setMouseTracking(true); - mouseTimer = panelGL->setupMouseTimer(); - connect(mouseTimer, &QTimer::timeout, [=] { if (Config::MouseHide) panelGL->setCursor(Qt::BlankCursor);}); + if (hasOGL) + { + panel = panelGL; + panelGL->setMouseTracking(true); + mouseTimer = panelGL->setupMouseTimer(); + connect(mouseTimer, &QTimer::timeout, [=] { if (Config::MouseHide) panelGL->setCursor(Qt::BlankCursor);}); + } } if (!hasOGL) |