if(!gPreviousMenuHandleStack[gPreviousMenuHandleStack.Count() - 1])
if(gPreviousMenuHandleStack.Count() == 0 || !gPreviousMenuHandleStack[gPreviousMenuHandleStack.Count() - 1])
void nsCheckDestroy(MenuHandle theMenu, short * whichItem){  // Determine if we have unselected the previous popup. If so we need to   // destroy it now.  bool changeOccured = true;  bool isChild = false;  if(gCurrentMenuItem == *whichItem)    changeOccured = false;  if(!gPreviousMenuHandleStack[gPreviousMenuHandleStack.Count() - 1])    changeOccured = false;    if(nsIsHierChild(theMenu))    isChild = true;    if(changeOccured && !isChild) {        nsPreviousMenuStackUnwind(nsnull, theMenu);    if(gCurrentMenuDepth > 1)      gCurrentMenuDepth--;  }}