fix crash when clearing the queue
This commit is contained in:
parent
66d24b49c6
commit
207b075d13
2 changed files with 2 additions and 2 deletions
|
|
@ -480,6 +480,8 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
|
||||||
|
|
||||||
private void openCurrent() {
|
private void openCurrent() {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
|
// current song will be null when queue is cleared
|
||||||
|
if (getCurrentSong() == null) return;
|
||||||
playback.setDataSource(getTrackUri(getCurrentSong()));
|
playback.setDataSource(getTrackUri(getCurrentSong()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,6 @@ import java.util.Locale;
|
||||||
|
|
||||||
public class MusicUtil {
|
public class MusicUtil {
|
||||||
public static Uri getSongFileUri(Song song) {
|
public static Uri getSongFileUri(Song song) {
|
||||||
if (song.id == null) return null;
|
|
||||||
|
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
ApiClient apiClient = App.getApiClient();
|
ApiClient apiClient = App.getApiClient();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue