You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
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:
committed by
Rémi Verschelde
parent
7bd101b5c5
commit
cb9bc18102
@@ -224,6 +224,11 @@ void VideoStreamPlaybackGDNative::cleanup() {
|
|||||||
interface->destructor(data_struct);
|
interface->destructor(data_struct);
|
||||||
if (pcm)
|
if (pcm)
|
||||||
memfree(pcm);
|
memfree(pcm);
|
||||||
|
if (file) {
|
||||||
|
file->close();
|
||||||
|
memdelete(file);
|
||||||
|
file = NULL;
|
||||||
|
}
|
||||||
pcm = NULL;
|
pcm = NULL;
|
||||||
time = 0;
|
time = 0;
|
||||||
num_channels = -1;
|
num_channels = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user