summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-03-06 22:21:54 +0100
committerGitHub <noreply@github.com>2018-03-06 22:21:54 +0100
commit2f3c45f55eab7364ff0f6806c81ddc7ba861e1a2 (patch)
tree1eba92f8dcf91e68bed51b2ca1d2d250a9a84cd2
parent0251c85a4b752736f712cd53f144c0ae1ce0cd2e (diff)
parenta8d37de4611e1ee9e73a8aed19fe2d7090ec45ce (diff)
Merge pull request #17318 from robfram/silent-failure-ogg-9793
Fix silent failure of importing OGG Vorbis files
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
index 16ebfa2832..c8acdb689a 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);