--- a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java Wed Jul 05 20:07:55 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java Fri Nov 14 12:32:43 2014 +0300
@@ -1882,6 +1882,9 @@
public synchronized void setWindowDeactivationTime(Window w, long time) {
AppContext ctx = getAppContext(w);
+ if (ctx == null) {
+ return;
+ }
@SuppressWarnings("unchecked")
WeakHashMap<Window, Long> map = (WeakHashMap<Window, Long>)ctx.get(DEACTIVATION_TIMES_MAP_KEY);
if (map == null) {
@@ -1893,6 +1896,9 @@
public synchronized long getWindowDeactivationTime(Window w) {
AppContext ctx = getAppContext(w);
+ if (ctx == null) {
+ return -1;
+ }
@SuppressWarnings("unchecked")
WeakHashMap<Window, Long> map = (WeakHashMap<Window, Long>)ctx.get(DEACTIVATION_TIMES_MAP_KEY);
if (map == null) {