My only guess is that the value of iItem exceeds the size of g_iCategoriesMenuPointers. But, that is just a guess since we don't have the complete code
I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).