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:
Adrian Ulrich 2017-04-22 18:30:25 +02:00
parent 07a0a1a81a
commit df49dd1a49

View File

@ -862,7 +862,8 @@ public class LibraryActivity
@Override
public void onMediaChange()
{
mPagerAdapter.invalidateData();
if (mPagerAdapter != null)
mPagerAdapter.invalidateData();
}
@Override