changeset 2129:02985c07385e

fix RT-27192 NullPointer in menuButton on menuItem accelerator key handler
author Paru Somashekar <paru.somashekar@oracle.com>
date Thu, 03 Jan 2013 15:56:03 -0800
parents 955b583b0ce5
children b0a03ab44363
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/MenuButtonSkinBase.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/MenuButtonSkinBase.java	Fri Jan 04 11:51:34 2013 +1300
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/MenuButtonSkinBase.java	Thu Jan 03 15:56:03 2013 -0800
@@ -279,7 +279,7 @@
                                     Event.fireEvent(menuitem, new Event(MenuItem.MENU_VALIDATION_EVENT));
                                 }
                                 Menu target = (Menu)menuitem.getParentMenu();
-                                if(target.getOnMenuValidation() != null) {
+                                if(target!= null && target.getOnMenuValidation() != null) {
                                     Event.fireEvent(target, new Event(MenuItem.MENU_VALIDATION_EVENT));
                                 }
                                 if (!menuitem.isDisable()) menuitem.fire();