Try using

void SetTimerInHUD( CBaseEntity *pTimer )
{
  if ( pTimer )
  {
    m_iTimerToShowInHUD = pTimer->entindex();
  }
  else
  {
    m_iTimerToShowInHUD = NULL;
  }
}

instead. Somehow it looks like you are accessing a null pointer like a 
class, and then accessing a member of that null-pointer-class, thus try 
are trying to access location 0x00000304, which is so close to null that 
this is probably what is happening. Therefore, there might be a bug in 
your zero-detection code, so try using the secure method above and see 
if that fixes the error.

Or! Another plausible explation is that the current class (this->) is 
infact NULL, and the function that calls this function accesses a 
null-pointer, thus m_iTimerToShowInHUD refers to an illegal position.

If this is the case, the error might not be in the calling function, it 
could happen way down the stack sometimes. Go through the entire stack 
using the debugger or a minidump and see if you find anything nasty.

. Sortie.

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to