changeset 6963:077a84d87eb4

RT-36905 Null pointer when a button without a mnemonic is re-added to a scene and alt is pressed Reviewed by: jgiles
author Martin Sladecek <martin.sladecek@oracle.com>
date Fri, 02 May 2014 08:05:38 +0200
parents 7944afc1542c
children 225ce268fe32
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledSkinBase.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledSkinBase.java	Thu May 01 20:53:20 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/LabeledSkinBase.java	Fri May 02 08:05:38 2014 +0200
@@ -261,7 +261,7 @@
     protected void mnemonicTargetChanged() {
         if (containsMnemonic == true) {
             /*
-            ** was there previously a labelFor
+            ** was there previously a labelFor  
             */
             removeMnemonic();
 
@@ -283,7 +283,7 @@
         final Labeled labeled = getSkinnable();
         Scene scene = labeled.getScene();
 
-        if (scene != null) {
+        if (scene != null && containsMnemonic) {
             addMnemonic();
         }