From 089053b45b0509127cc61264c3b07147fa17e6b5 Mon Sep 17 00:00:00 2001 From: Patrick Linstruth Date: Thu, 30 May 2019 18:54:41 -0700 Subject: [PATCH] Fixed bug where QFile.open(fd) exhausted by file handles by not specifying QFile::AutoCloseHandle option. --- lib/rdwavefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdwavefile.cpp b/lib/rdwavefile.cpp index 4687e8d3..51d140ff 100644 --- a/lib/rdwavefile.cpp +++ b/lib/rdwavefile.cpp @@ -231,7 +231,7 @@ bool RDWaveFile::openWave(RDWaveData *data) if((fd=open(wave_file_name.toUtf8(),O_RDONLY))<0) { return false; } - if(!wave_file.open(fd,QIODevice::ReadOnly)) { + if(!wave_file.open(fd,QIODevice::ReadOnly,QFile::AutoCloseHandle)) { return false; } switch(GetType(wave_file.handle())) {