[Android] fix possible NoSuchElementException in ThumbnailManager

Sébastien Toque git at videolan.org
Mon Jul 2 21:02:05 CEST 2012


android | branch: master | Sébastien Toque <xilasz at gmail.com> | Mon Jul  2 21:01:39 2012 +0200| [c2257f5d344a7357a85775d8e5055041836b7693] | committer: Sébastien Toque

fix possible NoSuchElementException in ThumbnailManager

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

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

diff --git a/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java b/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java
index bf3f28e..ef8d27d 100644
--- a/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java
+++ b/vlc-android/src/org/videolan/vlc/ThumbnailerManager.java
@@ -114,9 +114,9 @@ public class ThumbnailerManager extends Thread {
             if (killed)
                 break;
             total = totalCount;
+            Media item = mItems.poll();
             lock.unlock();
 
-            Media item = mItems.poll();
             MainActivity.showProgressBar(mVideoListActivity.getActivity());
 
             Log.i(TAG, "show ProgressBar!");



More information about the Android mailing list