summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnish <anishbhobe@hotmail.com>2019-03-07 00:15:57 +0530
committerRĂ©mi Verschelde <rverschelde@gmail.com>2019-03-06 22:56:36 +0100
commit978c2a604a86ac862a448d1089eb5563a528798b (patch)
treed58750e21d280fb94e573b52bd182b46dc464aa3
parent1100d6a8f2312d3bc4e96d195eba2592d76f395d (diff)
Fixed crash on loading GDNative videos.
Fixed issue with loading a resource supported by the gdnative videodecoders that does not exist.
-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);