Fixed crash when a plugin was unloaded before a client convar query had returned results (bug 4044, r=dvander).

This commit is contained in:
Scott Ehlert
2009-10-06 13:37:30 -05:00
parent 07901946d0
commit fcfd5c7419
4 changed files with 37 additions and 16 deletions
+7 -4
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourcePawn
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -25,8 +25,6 @@
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include <stdio.h>
@@ -332,6 +330,11 @@ int CFunction::Execute2(IPluginContext *ctx, cell_t *result)
return err;
}
IPluginRuntime *CFunction::GetParentRuntime()
{
return m_pRuntime;
}
funcid_t CFunction::GetFunctionID()
{
return m_FnId;
+3 -4
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourcePawn
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -25,8 +25,6 @@
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_BASEFUNCTION_H_
@@ -82,6 +80,7 @@ public:
const cell_t *params,
unsigned int num_params,
cell_t *result);
IPluginRuntime *GetParentRuntime();
public:
void Set(BaseRuntime *runtime, funcid_t fnid, uint32_t pub_id);
private: