check for beingdestroyed in finalize, thx to Tony Anecito
authorFilippo Carone <littlejohn@videolan.org>
Mon, 14 May 2007 19:54:43 +0000 (19:54 +0000)
committerFilippo Carone <littlejohn@videolan.org>
Mon, 14 May 2007 19:54:43 +0000 (19:54 +0000)
org/videolan/jvlc/JVLC.java

index 2bedead..91a8224 100644 (file)
@@ -162,7 +162,10 @@ public class JVLC implements Runnable {
         * @see java.lang.Object#finalize()
         */
        protected void finalize() throws Throwable {
-               destroy();
+               if (!beingDestroyed)
+               {
+                       destroy();
+               }
                super.finalize();
        }