From 3b5c704383ecb28cfb1519c1600a8fcaf51535b7 Mon Sep 17 00:00:00 2001 From: Brian Matzon Date: Sun, 6 Apr 2008 22:15:16 +0000 Subject: [PATCH] fixed issue with prematurely interrupting the inputstream getter thread\nmade secondary check for inputstream null --- src/java/org/lwjgl/util/applet/AppletLoader.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/java/org/lwjgl/util/applet/AppletLoader.java b/src/java/org/lwjgl/util/applet/AppletLoader.java index 5a62ec61..75882598 100644 --- a/src/java/org/lwjgl/util/applet/AppletLoader.java +++ b/src/java/org/lwjgl/util/applet/AppletLoader.java @@ -732,7 +732,7 @@ public class AppletLoader extends Applet implements Runnable, AppletStub { t.start(); int iterationCount = 0; - while(is == null && iterationCount++ < 5) { + while(is[0] == null && iterationCount++ < 5) { try { t.join(1000); } catch (InterruptedException inte) { @@ -740,12 +740,14 @@ public class AppletLoader extends Applet implements Runnable, AppletStub { } } - try { - t.interrupt(); - t.join(); - } catch (InterruptedException inte) { - /* ignored */ - } + if(is[0] == null) { + try { + t.interrupt(); + t.join(); + } catch (InterruptedException inte) { + /* ignored */ + } + } } if(is[0] == null) {