aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llcommon/llevent.cpp')
-rw-r--r--linden/indra/llcommon/llevent.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/linden/indra/llcommon/llevent.cpp b/linden/indra/llcommon/llevent.cpp
index e9b6a51..bbb37c5 100644
--- a/linden/indra/llcommon/llevent.cpp
+++ b/linden/indra/llcommon/llevent.cpp
@@ -186,16 +186,14 @@ void LLSimpleDispatcher::addListener(LLEventListener* listener, LLSD filter, con
186 186
187void LLSimpleDispatcher::removeListener(LLEventListener* listener) 187void LLSimpleDispatcher::removeListener(LLEventListener* listener)
188{ 188{
189 std::vector<LLListenerEntry>::iterator itor; 189 std::vector<LLListenerEntry>::iterator itor = mListeners.begin();
190 for (itor=mListeners.begin(); itor!=mListeners.end();) 190 std::vector<LLListenerEntry>::iterator end = mListeners.end();
191 for (; itor != end; ++itor)
191 { 192 {
192 if ((*itor).listener == listener) 193 if ((*itor).listener == listener)
193 { 194 {
194 mListeners.erase(itor); 195 mListeners.erase(itor);
195 } 196 break;
196 else
197 {
198 ++itor;
199 } 197 }
200 } 198 }
201 listener->handleDetach(mParent); 199 listener->handleDetach(mParent);