From 61b6a32631ee426ef1f391248b51168b697da2cf Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Thu, 15 May 2014 10:49:32 -0400 Subject: [PATCH] Fix crash in ReconnectClient and Inactivate client when IServer ptr is null (bug 6122, r=asherkin). --HG-- extra : amend_source : a38ac59091e43118d61b9c3eda30dece4190992e --- extensions/sdktools/clientnatives.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/sdktools/clientnatives.cpp b/extensions/sdktools/clientnatives.cpp index 2547be6d0..497788b70 100644 --- a/extensions/sdktools/clientnatives.cpp +++ b/extensions/sdktools/clientnatives.cpp @@ -47,7 +47,7 @@ static cell_t smn_InactivateClient(IPluginContext *pContext, const cell_t *param if (!iserver) { - pContext->ThrowNativeError("IServer is null"); + return pContext->ThrowNativeError("IServer interface not supported, file a bug report."); } IClient* pClient = iserver->GetClient(params[1] - 1); @@ -74,7 +74,7 @@ static cell_t smn_ReconnectClient(IPluginContext *pContext, const cell_t *params if (!iserver) { - pContext->ThrowNativeError("IServer is null"); + return pContext->ThrowNativeError("IServer interface not supported, file a bug report."); } IClient* pClient = iserver->GetClient(params[1] - 1);