From 8cf9c41830eb4e9532d3f85e7c4fc96760423d85 Mon Sep 17 00:00:00 2001 From: ccw808 Date: Wed, 28 Apr 2010 13:22:20 +0000 Subject: [PATCH] Fixed a crash when callRemote returns an error after it's resource has stopped. --- MTA10_Server/mods/deathmatch/logic/CRemoteCalls.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MTA10_Server/mods/deathmatch/logic/CRemoteCalls.cpp b/MTA10_Server/mods/deathmatch/logic/CRemoteCalls.cpp index 5b2ebaa59f..1d916ad720 100644 --- a/MTA10_Server/mods/deathmatch/logic/CRemoteCalls.cpp +++ b/MTA10_Server/mods/deathmatch/logic/CRemoteCalls.cpp @@ -148,8 +148,9 @@ void CRemoteCall::ProgressCallback(double sizeJustDownloaded, double totalDownlo arguments.PushString("ERROR"); arguments.PushNumber(error); arguments.Call ( call->m_VM, call->m_iFunction); + + g_pGame->GetRemoteCalls()->Remove(call); // delete ourselves } - g_pGame->GetRemoteCalls()->Remove(call); // delete ourselves } }