summaryrefslogtreecommitdiff
path: root/indra/lscript/lscript_compile/lscript_tree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/lscript/lscript_compile/lscript_tree.cpp')
-rw-r--r--indra/lscript/lscript_compile/lscript_tree.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/lscript/lscript_compile/lscript_tree.cpp b/indra/lscript/lscript_compile/lscript_tree.cpp
index 3b8bbbe805..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
@@ -10626,6 +10627,8 @@ LLScriptScript::LLScriptScript(LLScritpGlobalStorage *globals,
}
temp = temp->mNextp;
}
+
+ mClassName[0] = '\0';
}
void LLScriptScript::setBytecodeDest(const char* dst_filename)