Qt: Fix potential directory handle leak

This commit is contained in:
Vicki Pfau 2023-03-02 20:31:11 -08:00
parent b8248327a2
commit 1ed40a1931
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}