[Android] Fix potential NullDereference in Ringtone setting
Jean-Baptiste Kempf
git at videolan.org
Thu Jul 17 08:19:35 CEST 2014
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jul 17 08:18:28 2014 +0200| [2bf89d8ab8db7e39ef76a924195db378fd99331a] | committer: Jean-Baptiste Kempf
Fix potential NullDereference in Ringtone setting
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=2bf89d8ab8db7e39ef76a924195db378fd99331a
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
index c217e82..4f4258f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
@@ -76,7 +76,7 @@ public class AudioUtil {
public static void setRingtone(Media song, Context context){
File newringtone = LibVlcUtil.URItoFile(song.getLocation());
- if(!newringtone.exists()) {
+ if( newringtone != null && !newringtone.exists()) {
Toast.makeText(context.getApplicationContext(),context.getString(R.string.ringtone_error), Toast.LENGTH_SHORT).show();
return;
}
More information about the Android
mailing list