There is a problem in the game - crash in the battle with units- berserkers.
So for berserkers:
indeed, a crash occurs on one instruction (in a function consisting of one single instruction). There is a crash due to the fact that the instruction is trying to get something out of the empty pointer, but can’t do this.
I have no idea what the function that causes this problem does.
This function is called from over 160 places. So I can’t chop it off.
When it is skipped, it seems like nothing bad happens.
The results of this function are used for some calculations.
What I see the solution is to add a small condition to the function that calls this problematic one. And if there is zero instead of a pointer, then just skip the call to this function. Although I will probably do it a little differently, but the meaning is the same. I will deal with this issue in the evening.