Fix a potential crash if SV_DropClient address could not be found
This commit is contained in:
parent
e2e57d8347
commit
42fb860077
|
@ -1566,7 +1566,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
|
||||||
|
|
||||||
void *address = nullptr;
|
void *address = nullptr;
|
||||||
|
|
||||||
if (CommonConfig && CommonConfig->GetMemSig("SV_DropClient", &address))
|
if (CommonConfig && CommonConfig->GetMemSig("SV_DropClient", &address) && address)
|
||||||
{
|
{
|
||||||
DropClientDetour = DETOUR_CREATE_STATIC_FIXED(SV_DropClient, address);
|
DropClientDetour = DETOUR_CREATE_STATIC_FIXED(SV_DropClient, address);
|
||||||
DropClientDetour->EnableDetour();
|
DropClientDetour->EnableDetour();
|
||||||
|
|
|
@ -543,11 +543,11 @@ void InitGlobalVars()
|
||||||
|
|
||||||
if (!ServerStatic)
|
if (!ServerStatic)
|
||||||
{
|
{
|
||||||
MF_Log("svs global variable is not available\n");
|
MF_Log("svs global variable is not available");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Server)
|
if (!Server)
|
||||||
{
|
{
|
||||||
MF_Log("sv global variable is not available\n");
|
MF_Log("sv global variable is not available");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user