From 270da3e14161d7bf0d53b5f8ebfb9aaf5ad87893 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Wed, 12 May 2010 02:24:46 +0100 Subject: EXT-7138 WIP Allow selection of no voice font when none are available. --- indra/newview/llvoiceclient.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index e140c6f2ee..d8bf781ce0 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -7322,16 +7322,18 @@ bool LLVoiceClient::setVoiceFont(const LLUUID& id) return false; } - if (!hasVoiceFonts()) - { - LL_DEBUGS("Voice") << "Voice fonts not available." << LL_ENDL; - return false; - } - - if (!id.isNull() && (mVoiceFontMap.find(&id) == mVoiceFontMap.end())) + if (!id.isNull()) { - LL_DEBUGS("Voice") << "Invalid voice font " << id << LL_ENDL; - return false; + if (!hasVoiceFonts()) + { + LL_DEBUGS("Voice") << "Voice fonts not available." << LL_ENDL; + return false; + } + else if (mVoiceFontMap.find(&id) == mVoiceFontMap.end()) + { + LL_DEBUGS("Voice") << "Invalid voice font " << id << LL_ENDL; + return false; + } } // *TODO: Check for expired fonts? -- cgit v1.2.3