Commit ab2f8348 authored by Tiago Cunha's avatar Tiago Cunha

Fixes a NPE

parent 10a5e85d
...@@ -75,13 +75,20 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract ...@@ -75,13 +75,20 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
protected void onResume() { protected void onResume() {
isForeground = true; isForeground = true;
super.onResume(); super.onResume();
if (presenter != null) {
presenter.bindView(this); presenter.bindView(this);
} }
}
@Override @Override
protected void onPause() { protected void onPause() {
isForeground = false; isForeground = false;
if (presenter != null) {
presenter.release(); presenter.release();
}
super.onPause(); super.onPause();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment