Skip to content

Commit 0b951e5

Browse files
committed
up
1 parent e28313b commit 0b951e5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Entity.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,14 @@ public void baseCall(string methodname, object[] arguments)
118118
Dbg.ERROR_MSG(className + "::baseCall(" + methodname + "), currserver=!" + KBEngineApp.app.currserver);
119119
return;
120120
}
121+
122+
Method method = null;
123+
if(!EntityDef.moduledefs[className].base_methods.TryGetValue(methodname, out method))
124+
{
125+
Dbg.ERROR_MSG(className + "::baseCall(" + methodname + "), not found method!");
126+
return;
127+
}
121128

122-
Method method = EntityDef.moduledefs[className].base_methods[methodname];
123129
UInt16 methodID = method.methodUtype;
124130

125131
if(arguments.Length != method.args.Count)
@@ -156,7 +162,13 @@ public void cellCall(string methodname, object[] arguments)
156162
return;
157163
}
158164

159-
Method method = EntityDef.moduledefs[className].cell_methods[methodname];
165+
Method method = null;
166+
if(!EntityDef.moduledefs[className].cell_methods.TryGetValue(methodname, out method))
167+
{
168+
Dbg.ERROR_MSG(className + "::cellCall(" + methodname + "), not found method!");
169+
return;
170+
}
171+
160172
UInt16 methodID = method.methodUtype;
161173

162174
if(arguments.Length != method.args.Count)

0 commit comments

Comments
 (0)