This is the place where error occured:
(and these are first instruction in the function body, even before STWH check)
Code:
player = (Player *)owner;
ent = (gentity_t *)player->entity_pointer;
"owner" is a pointer that is passed to BulletAttack function, so it shouldn't be empty, I can always grab owner from weapon pointer.
The only thing that can cause crash here is:
1. owner is messed up or NULL
2. while trying to reach player->entity_pointer it will crash then
and this is the only possibility. I hope that owner is just NULL sometimes and not some bogus stuff, because it will be harder to detect. If it becomes NULL sometimes, then I'll make additional checks and grab player pointer from weapon pointer, which is also passed to BulletAttack and HAVE TO be correct.