Fix NPE where mLastRequestedCtx may be null
This commit is contained in:
parent
7ad4b59cf6
commit
8f095e62ed
@ -779,6 +779,10 @@ public abstract class PlaybackActivity extends Activity
|
|||||||
.setItems(pNamesArr, new DialogInterface.OnClickListener() {
|
.setItems(pNamesArr, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
if (mLastRequestedCtx == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
long id = mLastRequestedCtx.getLongExtra("id", LibraryAdapter.INVALID_ID);
|
long id = mLastRequestedCtx.getLongExtra("id", LibraryAdapter.INVALID_ID);
|
||||||
Song resolved = MediaUtils.getSongByTypeId(PlaybackActivity.this, MediaUtils.TYPE_SONG, id);
|
Song resolved = MediaUtils.getSongByTypeId(PlaybackActivity.this, MediaUtils.TYPE_SONG, id);
|
||||||
if (resolved != null) {
|
if (resolved != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user