diff --git a/plugins/spu2-x/src/WavFile.cpp b/plugins/spu2-x/src/WavFile.cpp index dc0953ace3..d44e58d4a7 100644 --- a/plugins/spu2-x/src/WavFile.cpp +++ b/plugins/spu2-x/src/WavFile.cpp @@ -60,9 +60,11 @@ WavOutFile::WavOutFile(const char *fileName, int sampleRate, int bits, int chann WavOutFile::~WavOutFile() { - finishHeader(); - if (fptr) fclose(fptr); - fptr = NULL; + if (fptr) + { + finishHeader(); + fclose(fptr); + } }