Commit 2bf89d8a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Fix potential NullDereference in Ringtone setting

parent 5fc42219
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment