src/macosx/classes/sun/lwawt/LWWindowPeer.java

Print this page

        

@@ -405,11 +405,15 @@
     }
 
     @Override
     public void setModalBlocked(Dialog blocker, boolean blocked) {
         synchronized (getPeerTreeLock()) {
-            this.blocker = blocked ? (LWWindowPeer)blocker.getPeer() : null;
+            if(blocked && blocker.getPeer() instanceof LWWindowPeer) {
+                this.blocker = (LWWindowPeer)blocker.getPeer();
+            } else {
+                this.blocker = null;
+            }
         }
     }
 
     @Override
     public void updateMinimumSize() {