check return value of getSong(0)
This commit is contained in:
parent
0832a0175d
commit
84f153d49a
@ -402,6 +402,8 @@ public class FullPlaybackActivity extends PlaybackActivity
|
|||||||
final PlaybackService playbackService = PlaybackService.get(this);
|
final PlaybackService playbackService = PlaybackService.get(this);
|
||||||
final Song sng = playbackService.getSong(0);
|
final Song sng = playbackService.getSong(0);
|
||||||
final PlaybackActivity activity = this;
|
final PlaybackActivity activity = this;
|
||||||
|
|
||||||
|
if (sng != null) {
|
||||||
String delete_message = getString(R.string.delete_item, sng.title);
|
String delete_message = getString(R.string.delete_item, sng.title);
|
||||||
AlertDialog.Builder dialog = new AlertDialog.Builder(this);
|
AlertDialog.Builder dialog = new AlertDialog.Builder(this);
|
||||||
dialog.setTitle(R.string.delete);
|
dialog.setTitle(R.string.delete);
|
||||||
@ -420,6 +422,7 @@ public class FullPlaybackActivity extends PlaybackActivity
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
dialog.create().show();
|
dialog.create().show();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MENU_SHOW_QUEUE:
|
case MENU_SHOW_QUEUE:
|
||||||
startActivity(new Intent(this, ShowQueueActivity.class));
|
startActivity(new Intent(this, ShowQueueActivity.class));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user