Skip to content

Commit

Permalink
[android] crash on startup fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
gubatron committed Mar 9, 2016
1 parent f3654e3 commit 8c8c594
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public PlaylistAdapter(final Context context, final int layoutId) {

@Override
public long getItemId(int position) {
return getItem(position).mPlaylistId;
final Playlist item = getItem(position);
return item != null ? item.mPlaylistId : -1;
}

/**
Expand Down

0 comments on commit 8c8c594

Please sign in to comment.