Fixed amb581 - reentrancy problems with Call_Finish()
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401088
This commit is contained in:
@@ -75,6 +75,7 @@ inline void ResetCall()
|
||||
{
|
||||
s_CallStarted = false;
|
||||
s_pFunction = NULL;
|
||||
s_pForward = NULL;
|
||||
s_pCallable = NULL;
|
||||
}
|
||||
|
||||
@@ -542,14 +543,14 @@ static cell_t sm_CallFinish(IPluginContext *pContext, const cell_t *params)
|
||||
if (s_pFunction)
|
||||
{
|
||||
IPluginFunction *pFunction = s_pFunction;
|
||||
ResetCall();
|
||||
err = pFunction->Execute(result);
|
||||
} else if (s_pForward) {
|
||||
IForward *pForward = s_pForward;
|
||||
ResetCall();
|
||||
err = pForward->Execute(result, NULL);
|
||||
}
|
||||
|
||||
ResetCall();
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user