[Android] do not crash when stopping thumbnailer if it wasn't started

Sébastien Toque git at videolan.org
Tue Oct 2 21:43:10 CEST 2012


vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Tue Oct  2 20:23:54 2012 +0200| [e78d7d4ca958b1a851736562f306f11b899e32b8] | committer: Sébastien Toque

do not crash when stopping thumbnailer if it wasn't started

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=e78d7d4ca958b1a851736562f306f11b899e32b8
---

 vlc-android/src/org/videolan/vlc/ThumbnailerManager.java |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java b/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java
index 8f7d8a1..c9e76c6 100644
--- a/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java
+++ b/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java
@@ -81,7 +81,8 @@ public class ThumbnailerManager implements Runnable {
 
     public void stop() {
         isStopping = true;
-        mThread.interrupt();
+        if (mThread != null)
+            mThread.interrupt();
     }
 
     /**



More information about the Android mailing list