[Android] libvlc: Media: better exception
Thomas Guillem
git at videolan.org
Thu May 28 11:20:06 CEST 2015
vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu May 28 11:05:49 2015 +0200| [20b6e1dc6f106ca42d69f3c05381de16282cda87] | committer: Thomas Guillem
libvlc: Media: better exception
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=20b6e1dc6f106ca42d69f3c05381de16282cda87
---
libvlc/src/org/videolan/libvlc/Media.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvlc/src/org/videolan/libvlc/Media.java b/libvlc/src/org/videolan/libvlc/Media.java
index 3f217f2..3255afa 100644
--- a/libvlc/src/org/videolan/libvlc/Media.java
+++ b/libvlc/src/org/videolan/libvlc/Media.java
@@ -267,8 +267,8 @@ public class Media extends VLCObject {
* @param index
*/
protected Media(MediaList ml, int index) {
- if (ml.isReleased())
- throw new IllegalArgumentException("MediaList is not native");
+ if (ml == null || ml.isReleased())
+ throw new IllegalArgumentException("MediaList is null or released");
nativeNewFromMediaList(ml, index);
mMrl = nativeGetMrl();
mNativeMetas = nativeGetMetas();
More information about the Android
mailing list