summaryrefslogtreecommitdiff
path: root/indra/lscript
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-02-17 17:02:26 -0800
committerRichard Linden <none@none>2010-02-17 17:02:26 -0800
commitcf52fc85ae4d06335a09b4dd60bddeb7f66841b3 (patch)
treeafa95f76e9ef3ebe9b91dce90d2a8671f28ab435 /indra/lscript
parent7c86d4434822d7a3172bed82c3812032089c1518 (diff)
parent9dfff8c6d2a54e3f6e069c26cc8753dc9331aec1 (diff)
merge
Diffstat (limited to 'indra/lscript')
-rw-r--r--indra/lscript/lscript_compile/lscript_tree.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/lscript/lscript_compile/lscript_tree.cpp b/indra/lscript/lscript_compile/lscript_tree.cpp
index 4ba41db2fc..3d19de193a 100644
--- a/indra/lscript/lscript_compile/lscript_tree.cpp
+++ b/indra/lscript/lscript_compile/lscript_tree.cpp
@@ -9805,6 +9805,9 @@ void LLScriptEventHandler::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
break;
case LSCP_EMIT_BYTE_CODE:
{
+ llassert(mEventp);
+ if (!mEventp) return;
+
// order for event handler
// set jump table value
S32 jumpoffset;
@@ -9818,13 +9821,11 @@ void LLScriptEventHandler::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
chunk->addBytes(4);
// null terminated event name and null terminated parameters
- if (mEventp)
- {
- LLScriptByteCodeChunk *event = new LLScriptByteCodeChunk(FALSE);
- mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, event, heap, stacksize, entry, entrycount, NULL);
- chunk->addBytes(event->mCodeChunk, event->mCurrentOffset);
- delete event;
- }
+ LLScriptByteCodeChunk *event = new LLScriptByteCodeChunk(FALSE);
+ mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, event, heap, stacksize, entry, entrycount, NULL);
+ chunk->addBytes(event->mCodeChunk, event->mCurrentOffset);
+ delete event;
+
chunk->addBytes(1);
// now we're at the first opcode