fix possible NPE
We register ourselfs as a callback receiver BEFORE the adapter has been created. This crash is unlikely but happens once in a while according to the play store.
This commit is contained in:
parent
07a0a1a81a
commit
df49dd1a49
@ -862,7 +862,8 @@ public class LibraryActivity
|
||||
@Override
|
||||
public void onMediaChange()
|
||||
{
|
||||
mPagerAdapter.invalidateData();
|
||||
if (mPagerAdapter != null)
|
||||
mPagerAdapter.invalidateData();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user