Merge pull request #26724 from KidRigger/gdnative-videodecoder-crash-fix

Fixed crash on loading GDNative videos.
This commit is contained in:
Rémi Verschelde 2019-03-06 22:57:09 +01:00 committed by GitHub
commit 63c512e1fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);