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:
1 parent
07a0a1a81a
commit
df49dd1a49
1 file changed
+2
-1
@@ -862,7 +862,8 @@ public class LibraryActivity
|
||||
@Override
|
||||
public void onMediaChange()
|
||||
{
|
||||
mPagerAdapter.invalidateData();
|
||||
if (mPagerAdapter != null)
|
||||
mPagerAdapter.invalidateData();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user