if(isChild || (gPreviousMenuHandleStack[gPreviousMenuHandleStack.Count() - 1] != theMenu))
if (isChild || (gPreviousMenuHandleStack.Count() == 0 || gPreviousMenuHandleStack[gPreviousMenuHandleStack.Count() - 1] != theMenu))
void nsPostBuild(nsIMenu * menu, MenuHandle theMenu, PRBool isChild){  // it is built now  if(isChild || (gPreviousMenuHandleStack[gPreviousMenuHandleStack.Count() - 1] != theMenu))  {    nsPushMenu(menu);      nsPushMenuHandle(theMenu);        //printf("Push: %d items in gMenuHandleStack \n", gMenuHandleStack.Count());  } }