VideoStreamGDNative: close file in cleanup

We should close the file handle when we are done.

(cherry picked from commit 3b05d2c989)
This commit is contained in:
Mark Kuo 2020-06-28 10:20:07 +10:00 committed by Rémi Verschelde
parent 7bd101b5c5
commit cb9bc18102
1 changed files with 5 additions and 0 deletions

View File

@ -224,6 +224,11 @@ void VideoStreamPlaybackGDNative::cleanup() {
interface->destructor(data_struct);
if (pcm)
memfree(pcm);
if (file) {
file->close();
memdelete(file);
file = NULL;
}
pcm = NULL;
time = 0;
num_channels = -1;