summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/fragments/LogFragment.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-11-19 00:22:56 +0100
committerArne Schwabe <arne@rfc2549.org>2013-11-19 00:22:56 +0100
commit42f552b5eeb209ba32282c87f61414bcaf85cf23 (patch)
tree1b16b59c3177e4b287e0a4bdc2e93847b0d02323 /src/de/blinkt/openvpn/fragments/LogFragment.java
parent8ced9f378613425efb9949196e967dbe2f03a63a (diff)
small bug fixes
Diffstat (limited to 'src/de/blinkt/openvpn/fragments/LogFragment.java')
-rw-r--r--src/de/blinkt/openvpn/fragments/LogFragment.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/de/blinkt/openvpn/fragments/LogFragment.java b/src/de/blinkt/openvpn/fragments/LogFragment.java
index 750b5703..721f0707 100644
--- a/src/de/blinkt/openvpn/fragments/LogFragment.java
+++ b/src/de/blinkt/openvpn/fragments/LogFragment.java
@@ -103,14 +103,16 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
final String down = String.format("%2$s/s %1$s", humanReadableByteCount(in, false), humanReadableByteCount(diffIn / OpenVPNManagement.mBytecountInterval, true));
final String up = String.format("%2$s/s %1$s", humanReadableByteCount(out, false), humanReadableByteCount(diffOut / OpenVPNManagement.mBytecountInterval, true));
- if(mUpStatus!=null && mDownStatus!=null) {
- getActivity().runOnUiThread(new Runnable() {
- @Override
- public void run() {
- mUpStatus.setText(up);
- mDownStatus.setText(down);
- }
- });
+ if (mUpStatus != null && mDownStatus != null) {
+ if (getActivity() != null) {
+ getActivity().runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ mUpStatus.setText(up);
+ mDownStatus.setText(down);
+ }
+ });
+ }
}
}