From 1ed40a1931afebbf905393f15bcbc9b08b5b11cb Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 2 Mar 2023 20:31:11 -0800 Subject: [PATCH] Qt: Fix potential directory handle leak --- src/platform/qt/Display.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/qt/Display.cpp b/src/platform/qt/Display.cpp index 7548e674c..0d1e7672d 100644 --- a/src/platform/qt/Display.cpp +++ b/src/platform/qt/Display.cpp @@ -112,9 +112,9 @@ void QGBA::Display::configure(ConfigController* config) { config->updateOption("showOSD"); config->updateOption("showFrameCounter"); #if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(BUILD_GLES3) - if (opts->shader) { + if (opts->shader && supportsShaders()) { struct VDir* shader = VDirOpen(opts->shader); - if (shader && supportsShaders()) { + if (shader) { setShaders(shader); shader->close(shader); }