1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00

Fixed rare case when trying to unregister a null observer

This commit is contained in:
Christophe Beyls 2016-10-26 14:52:06 +02:00
parent 49dbe375b7
commit 31a13a02c2

View file

@ -82,7 +82,7 @@ public class AdapterLinearLayout extends LinearLayout {
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
if (mAdapter != null) {
if ((mAdapter != null) && (mDataSetObserver != null)) {
mAdapter.mDataSetObservable.unregisterObserver(mDataSetObserver);
}
mDataSetObserver = null;