Skip to content
Snippets Groups Projects
Commit 1e5a8342 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix NullPointerException

(cherry picked from commit bc489c42)
parent 60facc73
No related branches found
No related tags found
1 merge request!7943.3.x
......@@ -25,12 +25,9 @@ import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.net.Uri;
import android.os.Build;
import androidx.annotation.NonNull;
import android.util.Log;
import org.videolan.libvlc.interfaces.ILibVLC;
import org.videolan.libvlc.interfaces.IMedia;
import org.videolan.libvlc.Media;
import androidx.annotation.NonNull;
import java.io.BufferedReader;
import java.io.Closeable;
......@@ -508,7 +505,8 @@ public class VLCUtil {
* Therefore, decode the characters authorized by Android Uri when creating an Uri from VLC.
*/
public static Uri UriFromMrl(String mrl) {
final char array[] = mrl.toCharArray();
if (mrl == null) return null;
final char[] array = mrl.toCharArray();
final StringBuilder sb = new StringBuilder(array.length*2);
for (int i = 0; i < array.length; ++i) {
final char c = array[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment