]> git.sesse.net Git - vlc/commitdiff
destroy logic cleaned up
authorFilippo Carone <littlejohn@videolan.org>
Wed, 16 May 2007 19:31:35 +0000 (19:31 +0000)
committerFilippo Carone <littlejohn@videolan.org>
Wed, 16 May 2007 19:31:35 +0000 (19:31 +0000)
bindings/java/org/videolan/jvlc/JVLC.java

index 91a822470af0afb3724c3057f66e686a824c75d9..4d98133f72bb44d11a1479156b23a88cf6e7e38a 100644 (file)
@@ -90,8 +90,11 @@ public class JVLC implements Runnable {
      * This is unreversible.
      */
     public void destroy() {
-       beingDestroyed = true;
-       _destroy();
+       if (!beingDestroyed)
+       {
+               beingDestroyed = true;
+               _destroy();
+       }
     }
  
 
@@ -162,10 +165,7 @@ public class JVLC implements Runnable {
         * @see java.lang.Object#finalize()
         */
        protected void finalize() throws Throwable {
-               if (!beingDestroyed)
-               {
-                       destroy();
-               }
+               destroy();
                super.finalize();
        }