From 591c7ed0bfcc0d961eee269420c26b972dcedc46 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 20 Feb 2016 19:01:31 +0100 Subject: [PATCH] Fixed: Display an error if unable to open a ogg file --HG-- branch : develop --- code/nel/src/sound/audio_decoder.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/code/nel/src/sound/audio_decoder.cpp b/code/nel/src/sound/audio_decoder.cpp index d8283c227..f4884a427 100644 --- a/code/nel/src/sound/audio_decoder.cpp +++ b/code/nel/src/sound/audio_decoder.cpp @@ -110,15 +110,18 @@ bool IAudioDecoder::getInfo(const std::string &filepath, std::string &artist, st CIFile ifile; ifile.setCacheFileOnOpen(false); ifile.allowBNPCacheFileOnOpen(false); - ifile.open(lookup); - return CAudioDecoderVorbis::getInfo(&ifile, artist, title); + if (ifile.open(lookup)) + return CAudioDecoderVorbis::getInfo(&ifile, artist, title); + + nlwarning("Unable to open: '%s'", filepath.c_str()); } else { nlwarning("Music file type unknown: '%s'", type_lower.c_str()); - artist.clear(); title.clear(); - return false; } + + artist.clear(); title.clear(); + return false; } /// Get audio/container extensions that are currently supported by the nel sound library.