Code:
static cell AMX_NATIVE_CALL menu_display(AMX *amx, cell *params)
{
GETMENU(params[2]);
int player = params[1];
int page = params[3];
CPlayer* pPlayer = GET_PLAYER_POINTER_I(player);
/* If the stupid handler keeps drawing menus,
* We need to keep cancelling them. But we put in a quick infinite loop
* counter to prevent this from going nuts.
*/
int menu;
int loops = 0;
while ((menu = pPlayer->newmenu) >= 0)
{
if ((size_t)menu >= g_NewMenus.size() || !g_NewMenus[menu])
{
break;
}
Menu *pOther = g_NewMenus[menu];
pOther->Close(pPlayer->index);
/* Infinite loop counter */
if (++loops >= 10)
{
LogError(amx, AMX_ERR_NATIVE, "Plugin called menu_display when item=MENU_EXIT");
return 0;
}
}
int time = -1;
if (params[0] / sizeof(cell) >= 4)
time = params[4];
if (time < 0)
pPlayer->menuexpire = INFINITE;
else
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
return pMenu->Display(player, page);
}
I'm not really sure what this means, but it seems like your other plugins are causing leaks because they're not destroying menus properly. Try to disable all of your plugins that add menus to the game, then try again.