From f7d51863f9b47e75ee85fadeaa734ff34f911d19 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 9 Sep 2010 12:38:03 +0100 Subject: slightly lame robustification for: CID-507 Checker: REVERSE_INULL Function: LLVorbisDecodeState::initDecode() File: /indra/llaudio/llaudiodecodemgr.cpp --- indra/llaudio/llaudiodecodemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llaudio/llaudiodecodemgr.cpp') diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index c82f194ff4..01dfd03c18 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -218,7 +218,7 @@ BOOL LLVorbisDecodeState::initDecode() S32 sample_count = ov_pcm_total(&mVF, -1); size_t size_guess = (size_t)sample_count; vorbis_info* vi = ov_info(&mVF, -1); - size_guess *= vi->channels; + size_guess *= (vi? vi->channels : 1); size_guess *= 2; size_guess += 2048; -- cgit v1.2.3