summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDániel Zolnai <daniel@egeniq.com>2017-09-12 12:51:49 +0200
committerArne Schwabe <arne@rfc2549.org>2017-09-12 13:27:51 +0200
commitd6d3bba6f0c070d151835f33ec2ec71a40f8a209 (patch)
tree64da23ec98f0159c992919937003506030149d38
parent0de6ff8bdc78611ba179a1349694beccf6a883cc (diff)
Fix rare crash with LogFragment
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java b/main/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java
index 30f922ae..e64ce2cd 100644
--- a/main/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java
+++ b/main/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java
@@ -503,13 +503,16 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
@Override
public void onResume() {
super.onResume();
- VpnStatus.addStateListener(this);
- VpnStatus.addByteCountListener(this);
Intent intent = new Intent(getActivity(), OpenVPNService.class);
intent.setAction(OpenVPNService.START_SERVICE);
-
}
+ @Override
+ public void onStart() {
+ super.onStart();
+ VpnStatus.addStateListener(this);
+ VpnStatus.addByteCountListener(this);
+ }
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {