changeset 2973:a2c3278c377c

6816582: WindowsFileChooserUI throws NullPointer when awt.useSystemAAFontSettings=false Reviewed-by: uta
author rupashka
date Mon, 25 Oct 2010 18:25:47 +0400
parents f52ad79e2826
children e650bbeab2f2
files src/share/classes/java/awt/Toolkit.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/Toolkit.java	Fri Oct 22 11:32:26 2010 -0700
+++ b/src/share/classes/java/awt/Toolkit.java	Mon Oct 25 18:25:47 2010 +0400
@@ -1831,7 +1831,11 @@
             desktopProperties.put(name, newValue);
         }
 
-        desktopPropsSupport.firePropertyChange(name, oldValue, newValue);
+        // Don't fire change event if old and new values are null.
+        // It helps to avoid recursive resending of WM_THEMECHANGED
+        if (oldValue != null || newValue != null) {
+            desktopPropsSupport.firePropertyChange(name, oldValue, newValue);
+        }
     }
 
     /**