this
Code:
int iTask = pBot->pTasks->iTask;
returns a pointer to the iTask element in the structure pointed to by pTasks. But this code will crash if pTasks is NULL, i.e. points to no tasks structure. This however
Code:
int iTask = BotGetSafeTask (pBot)->iTask;
will always return a valid pTasks pointer (even if it points to an empty task structure, what I'd call a "failsafe pointer"). This way iTask is always guaranteed to be accessible and the code won't crash.