Permalink
Browse files

Merge pull request #1 from Hyzhak/master

Fix bug with null menu.customItems, that fire on mobile devices
  • Loading branch information...
2 parents e3eff07 + c4f3d31 commit c6844447d02024c73d421d6cff4552ba08f37a0c @MindScriptAct committed Aug 11, 2012
Showing with 9 additions and 7 deletions.
  1. +9 −7 src/utils/debug/Stats.as
View
16 src/utils/debug/Stats.as
@@ -251,13 +251,15 @@ public class Stats extends Sprite {
}
var killMenuItem:ContextMenuItem = new ContextMenuItem(KILL_CAPTION, true);
killMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, destroy, false, 0, true);
- menu.customItems.push( //
- zoomMenuItem, //
- minimizeMenuItem, //
- dragMenuItem, //
- monitorMenuItem, //
- killMenuItem //
- );
+ if(menu.customItems != null){
+ menu.customItems.push( //
+ zoomMenuItem, //
+ minimizeMenuItem, //
+ dragMenuItem, //
+ monitorMenuItem, //
+ killMenuItem //
+ );
+ }
this.contextMenu = menu;
}

0 comments on commit c684444

Please sign in to comment.