mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix potential directory handle leak
This commit is contained in:
parent
e06fa02d14
commit
077aa04f48
|
@ -113,9 +113,9 @@ void QGBA::Display::configure(ConfigController* config) {
|
||||||
config->updateOption("showOSD");
|
config->updateOption("showOSD");
|
||||||
config->updateOption("showFrameCounter");
|
config->updateOption("showFrameCounter");
|
||||||
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(BUILD_GLES3)
|
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(BUILD_GLES3)
|
||||||
if (opts->shader) {
|
if (opts->shader && supportsShaders()) {
|
||||||
struct VDir* shader = VDirOpen(opts->shader);
|
struct VDir* shader = VDirOpen(opts->shader);
|
||||||
if (shader && supportsShaders()) {
|
if (shader) {
|
||||||
setShaders(shader);
|
setShaders(shader);
|
||||||
shader->close(shader);
|
shader->close(shader);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue