From 3212634ba81749e5dec0055ad9f6f8bdbd1407df Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 3 Aug 2010 12:13:50 -0700 Subject: fix for unit test asserts --- indra/newview/llmediadataclient.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 1de9d1c9b0..ec185bc790 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -265,13 +265,16 @@ void LLMediaDataClient::trackRequest(request_ptr_t request) { request_set_t::iterator iter = mUnQueuedRequests.lower_bound(request); - if(*iter == request) + if (iter != mUnQueuedRequests.end()) { - LL_WARNS("LLMediaDataClient") << "Tracking already tracked request: " << *request << LL_ENDL; - } - else - { - mUnQueuedRequests.insert(iter, request); + if(*iter == request) + { + LL_WARNS("LLMediaDataClient") << "Tracking already tracked request: " << *request << LL_ENDL; + } + else + { + mUnQueuedRequests.insert(iter, request); + } } } @@ -279,13 +282,16 @@ void LLMediaDataClient::stopTrackingRequest(request_ptr_t request) { request_set_t::iterator iter = mUnQueuedRequests.find(request); - if(*iter == request) + if (iter != mUnQueuedRequests.end()) { - mUnQueuedRequests.erase(iter); - } - else - { - LL_WARNS("LLMediaDataClient") << "Removing an untracked request: " << *request << LL_ENDL; + if(*iter == request) + { + mUnQueuedRequests.erase(iter); + } + else + { + LL_WARNS("LLMediaDataClient") << "Removing an untracked request: " << *request << LL_ENDL; + } } } -- cgit v1.2.3