summaryrefslogtreecommitdiff
path: root/indra/lscript/lscript_execute/lscript_execute.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-07-30 19:15:46 -0700
committerRichard Linden <none@none>2013-07-30 19:15:46 -0700
commit5762c1d0d727f0050aefe7126ab2d5280bebfb9b (patch)
tree78bdcc931460dfc45d35cd1707ddf1afdf049a2e /indra/lscript/lscript_execute/lscript_execute.cpp
parent4cca9ba279f908f206fa5e32adccf1038f05cc7f (diff)
parent910874a7e32bdfc456474e2d0ee84d190be3011e (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
Diffstat (limited to 'indra/lscript/lscript_execute/lscript_execute.cpp')
-rwxr-xr-xindra/lscript/lscript_execute/lscript_execute.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/lscript/lscript_execute/lscript_execute.cpp b/indra/lscript/lscript_execute/lscript_execute.cpp
index e9b4d1fcbb..70cdecbb18 100755
--- a/indra/lscript/lscript_execute/lscript_execute.cpp
+++ b/indra/lscript/lscript_execute/lscript_execute.cpp
@@ -417,10 +417,13 @@ void LLScriptExecuteLSL2::callEventHandler(LSCRIPTStateEventType event, const LL
void LLScriptExecuteLSL2::callQueuedEventHandler(LSCRIPTStateEventType event, const LLUUID &id, F32 time_slice)
{
S32 major_version = getMajorVersion();
- LLScriptDataCollection* eventdata;
- for (eventdata = mEventData.mEventDataList.getFirstData(); eventdata; eventdata = mEventData.mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventData.mEventDataList.begin(), end_it = mEventData.mEventDataList.end();
+ it != end_it;
+ ++it)
{
+ LLScriptDataCollection* eventdata = *it;
+
if (eventdata->mType == event)
{
// push a zero to be popped
@@ -458,7 +461,8 @@ void LLScriptExecuteLSL2::callQueuedEventHandler(LSCRIPTStateEventType event, co
S32 opcode_start = get_state_event_opcoode_start(mBuffer, current_state, event);
set_ip(mBuffer, opcode_start);
- mEventData.mEventDataList.deleteCurrentData();
+ delete *it;
+ mEventData.mEventDataList.erase(it);
break;
}
}