changeset 5004:25f9f28e0aa9

7124363: [macosx] ClassCastException: CFileDialog cannot be cast to LWWindowPeer Reviewed-by: alexp, serb
author kizune
date Wed, 15 Feb 2012 19:23:23 +0300
parents ac0b98130546
children 6a4ec376060d
files src/macosx/classes/sun/lwawt/LWWindowPeer.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Feb 15 18:37:09 2012 +0400
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Feb 15 19:23:23 2012 +0300
@@ -407,7 +407,11 @@
     @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;
+            }
         }
     }