Replace 'is' by 'as' and a null check in ScriptMemberWrapper
This commit is contained in:
committed by
Matthias Mailänder
parent
930f8ab207
commit
1a4b773fda
@@ -86,9 +86,11 @@ namespace OpenRA.Scripting
|
|||||||
{
|
{
|
||||||
foreach (var arg in clrArgs)
|
foreach (var arg in clrArgs)
|
||||||
{
|
{
|
||||||
if (!(arg is LuaValue[]))
|
var table = arg as LuaValue[];
|
||||||
|
if (table == null)
|
||||||
continue;
|
continue;
|
||||||
foreach (var value in (LuaValue[])arg)
|
|
||||||
|
foreach (var value in table)
|
||||||
value.Dispose();
|
value.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user