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:
parent
49dbe375b7
commit
31a13a02c2
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue