fix(radio): close file handle if sound file cannot be played (#5159)
This commit is contained in:
@@ -551,6 +551,7 @@ int WavContext::mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (result != FR_OK) {
|
if (result != FR_OK) {
|
||||||
|
f_close(&state.file);
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user