Skip to content

Commit f1123ed

Browse files
Tidy up CSimpleCallChainer::PostScriptExecute()
1 parent a6f9d0a commit f1123ed

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

sp/src/vscript/vscript_squirrel.nut

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,14 @@ class CSimpleCallChainer
118118
119119
function PostScriptExecute()
120120
{
121-
local func;
122-
try {
123-
func = scope[prefix];
124-
} catch(e) {
125-
return;
121+
if ( prefix in scope )
122+
{
123+
local func = scope[prefix];
124+
if ( typeof func == "function" )
125+
{
126+
chain.push(func);
127+
}
126128
}
127-
if (typeof(func) != "function")
128-
return;
129-
chain.push(func);
130129
}
131130

132131
function Call()
@@ -569,4 +568,4 @@ if (developer)
569568
__Documentation.RegisterHelp( "Lerp", "float Lerp(float, float, float)", "" );
570569
__Documentation.RegisterHelp( "SimpleSpline", "float SimpleSpline(float)", "" );
571570
}
572-
)vscript";
571+
)vscript";

0 commit comments

Comments
 (0)