From 978c2a604a86ac862a448d1089eb5563a528798b Mon Sep 17 00:00:00 2001 From: Anish Date: Thu, 7 Mar 2019 00:15:57 +0530 Subject: [PATCH] Fixed crash on loading GDNative videos. Fixed issue with loading a resource supported by the gdnative videodecoders that does not exist. --- modules/gdnative/videodecoder/video_stream_gdnative.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp index d1794b6c36a..8d6f167d044 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 ogv_stream = Ref(stream);