summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-03-06 22:57:09 +0100
committerGitHub <noreply@github.com>2019-03-06 22:57:09 +0100
commit63c512e1fb502c912cdbff42d6a27443b214d1f9 (patch)
treed58750e21d280fb94e573b52bd182b46dc464aa3
parent1100d6a8f2312d3bc4e96d195eba2592d76f395d (diff)
parent978c2a604a86ac862a448d1089eb5563a528798b (diff)
Merge pull request #26724 from KidRigger/gdnative-videodecoder-crash-fix
Fixed crash on loading GDNative videos.
-rw-r--r--modules/gdnative/videodecoder/video_stream_gdnative.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp
index d1794b6c36..8d6f167d04 100644
--- a/modules/gdnative/videodecoder/video_stream_gdnative.cpp
+++ b/modules/gdnative/videodecoder/video_stream_gdnative.cpp
@@ -355,9 +355,9 @@ RES ResourceFormatLoaderVideoStreamGDNative::load(const String &p_path, const St
if (r_error) {
*r_error = ERR_CANT_OPEN;
}
- memdelete(f);
return RES();
}
+ memdelete(f);
VideoStreamGDNative *stream = memnew(VideoStreamGDNative);
stream->set_file(p_path);
Ref<VideoStreamGDNative> ogv_stream = Ref<VideoStreamGDNative>(stream);