From a8d37de4611e1ee9e73a8aed19fe2d7090ec45ce Mon Sep 17 00:00:00 2001 From: robfram Date: Tue, 6 Mar 2018 21:48:30 +0100 Subject: [PATCH] Fix silent failure of importing OGG Vorbis files When importing non-valid OGG Vorbis audio files, now the filesystem navigation tree shows the correct sad red-face icon, as it does with non-valid PNG, JPG or WAV files. Fix #9793. --- modules/stb_vorbis/resource_importer_ogg_vorbis.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp index 16ebfa28325..c8acdb689a3 100644 --- a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp +++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp @@ -100,6 +100,7 @@ Error ResourceImporterOGGVorbis::import(const String &p_source_file, const Strin ogg_stream.instance(); ogg_stream->set_data(data); + ERR_FAIL_COND_V(!ogg_stream->get_data().size(), ERR_FILE_CORRUPT); ogg_stream->set_loop(loop); ogg_stream->set_loop_offset(loop_offset);