changeset 1680:2873c848523b

fix RT-24449 NPE running JFXControls Menus
author Paru Somashekar <paru.somashekar@oracle.com>
date Wed, 22 Aug 2012 13:40:13 -0700
parents b44a67205213
children 9bb47314da60
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ContextMenuContent.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/ContextMenuContent.java	Wed Aug 22 16:15:04 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ContextMenuContent.java	Wed Aug 22 13:40:13 2012 -0700
@@ -408,7 +408,7 @@
             final MenuItem item = getItems().get(row);
             if ((item instanceof CustomMenuItem && ((CustomMenuItem) item).getContent() == null) ||
                     item instanceof SeparatorMenuItem)  continue;
-            if ( item != null && item.getText().length() > len) {
+            if ( item != null && item.getText() != null && item.getText().length() > len) {
                 index = row;
                 len =  item.getText().length();
             }