]> source.dussan.org Git - tigervnc.git/commitdiff
Closing a different stream to prevent a problem. Also, added
authorwimba.com <wimba.com@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 1 Nov 2004 20:54:08 +0000 (20:54 +0000)
committerwimba.com <wimba.com@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 1 Nov 2004 20:54:08 +0000 (20:54 +0000)
an explicit catch and rethrow of a NullPointerException with a comment
so that this doesn't get 'fixed', as fixing it would break the applet
for some reason i don't understand.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2539 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/src/com/tightvnc/rfbplayer/RfbPlayer.java
java/src/com/tightvnc/rfbplayer/RfbProto.java

index 490b2bc03b0ae4d36d1503f240423fde1469b01c..7a767f17c8df61e4e07b72b388b9a51e35321052 100644 (file)
@@ -190,6 +190,9 @@ public class RfbPlayer extends java.applet.Applet
           }
           rfb.newSession(url);
           vc.updateFramebufferSize();
+        } catch (NullPointerException e) {
+          // catching this causes a hang with 1.4.1 JVM's under Win32 IE
+          throw e;
         }
       }
 
@@ -389,6 +392,7 @@ public class RfbPlayer extends java.applet.Applet
     } catch (InterruptedException e) {
     }
     if (inSeparateFrame) {
+      vncFrame.removeWindowListener(this);
       vncFrame.dispose();
     }
   }
index c5af418be9b178acb26a4f71946437bdbbd484c4..c60314856b5426794a3276f5883a81df8090aec7 100644 (file)
@@ -84,7 +84,7 @@ class RfbProto {
   public void quit() {
     fbs.quit();
     try {
-      is.close();
+      fbs.close();
     } catch (IOException e) {
       System.out.println("IOException quitting RfbProto: " + e);
     }