PHP Code:
void Extension::OnClientPutInServer(int client) //client is always valid here
{
IGamePlayer *iPlayer = playerhelpers->GetGamePlayer(client);
if(iPlayer && iPlayer->IsConnected()) {
unsigned int steamid = iPlayer->GetSteamAccountID();
...
I get crashes at this point, stack trace gives me this result:
Quote:
1 engine_srv.so + 0x1cdbd1
eip = 0xf5f3dbd1 esp = 0xffc48230 ebp = 0xffc48248
Found by: previous frame's frame pointer
2 sourcemod.2.css.so + 0x3dc1c (CPlayer::GetSteamAccountID(bool))
eip = 0xec8f8c1c esp = 0xffc48250 ebp = 0x129005b4
Found by: previous frame's frame pointer
3 extension.ext.2.css.so + 0x10bda
|
Shall I add extra checks to prevent crashes, or is there a bug in this function and I can do nothing about it?
PS it's a rare occasion, happens about 1/10000 calls