From 86a1fcf00968052f6967e912a2cb9aca5512ba63 Mon Sep 17 00:00:00 2001 From: John Zhen M Date: Sun, 24 Sep 2017 21:27:00 -0700 Subject: [PATCH] -Fixed unavailable current info when initial stream of playlist fails. --- .../java/org/schabi/newpipe/player/BasePlayer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index e0ef5d050..a2c5ba142 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -910,20 +910,20 @@ public abstract class BasePlayer implements Player.EventListener, return currentState; } - public String getVideoUrl() { - return currentInfo.url; - } - public long getVideoPos() { return videoPos; } + public String getVideoUrl() { + return currentInfo == null ? null : currentInfo.url; + } + public String getVideoTitle() { - return currentInfo.name; + return currentInfo == null ? null : currentInfo.name; } public String getUploaderName() { - return currentInfo.uploader_name; + return currentInfo == null ? null : currentInfo.uploader_name; } public boolean isCompleted() {