summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-03-18 15:09:52 +0100
committerArne Schwabe <arne@rfc2549.org>2014-03-18 15:09:52 +0100
commit80c550208c9e866c23a42b1304d036b6b6d87d10 (patch)
treeb52d0c8a3414426777b8847270a329f540b22018 /main/src
parent7afabd97eccdb4ca8d9101b04b2263957baef1e8 (diff)
try to fix bug reported by dev console
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java22
1 files changed, 12 insertions, 10 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 8530be34..386e3133 100644
--- a/main/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java
+++ b/main/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java
@@ -643,16 +643,18 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
@Override
public void run() {
- String prefix = getString(resId) + ":";
- if (status.equals("BYTECOUNT") || status.equals("NOPROCESS"))
- prefix = "";
- if (resId == R.string.unknown_state)
- prefix += status;
- if (mSpeedView != null)
- mSpeedView.setText(prefix + logMessage);
-
- if (mConnectStatus != null)
- mConnectStatus.setText(getString(resId));
+ if (isAdded()) {
+ String prefix = getString(resId) + ":";
+ if (status.equals("BYTECOUNT") || status.equals("NOPROCESS"))
+ prefix = "";
+ if (resId == R.string.unknown_state)
+ prefix += status;
+ if (mSpeedView != null)
+ mSpeedView.setText(prefix + logMessage);
+
+ if (mConnectStatus != null)
+ mConnectStatus.setText(getString(resId));
+ }
}
});
}