From 536902d61088f10acfb4deb38a17ac6f2badc3d3 Mon Sep 17 00:00:00 2001 From: WaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com> Date: Sun, 24 Jan 2021 15:44:05 +0000 Subject: [PATCH] Fix crash if OpenGL version is lower than requirements --- src/frontend/qt_sdl/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index a9089804..baa47160 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)