mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
mantis 8972: avoid null ref plus cosmetics
This commit is contained in:
@@ -135,10 +135,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
|
||||
// Initialize the API instance.
|
||||
scriptApi.Initialize(m_Engine, m_Part, m_Item);
|
||||
this.InitApi(api, scriptApi);
|
||||
InitApi(api, scriptApi);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get script object code loaded in memory and all ready to run,
|
||||
* ready to resume it from where the .state file says it was last
|
||||
@@ -250,7 +249,6 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
// If any error loading, decrement object code reference count.
|
||||
DecObjCodeRefCount();
|
||||
throw;
|
||||
@@ -326,16 +324,15 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
private void LoadObjCode()
|
||||
{
|
||||
// Script must leave this much stack remaining on calls to CheckRun().
|
||||
this.stackLimit = m_StackSize / 2;
|
||||
stackLimit = m_StackSize / 2;
|
||||
|
||||
// This is how many total heap bytes script is allowed to use.
|
||||
this.heapLimit = m_HeapSize;
|
||||
heapLimit = m_HeapSize;
|
||||
|
||||
// Allocate global variable arrays.
|
||||
this.glblVars.AllocVarArrays(m_ObjCode.glblSizes);
|
||||
glblVars.AllocVarArrays(m_ObjCode.glblSizes);
|
||||
|
||||
// Script can handle these event codes.
|
||||
m_HaveEventHandlers = new bool[m_ObjCode.scriptEventHandlerTable.GetLength(1)];
|
||||
for(int i = m_ObjCode.scriptEventHandlerTable.GetLength(0); --i >= 0;)
|
||||
{
|
||||
for(int j = m_ObjCode.scriptEventHandlerTable.GetLength(1); --j >= 0;)
|
||||
|
||||
Reference in New Issue
Block a user