diff options
author | Arne Schwabe <arne@rfc2549.org> | 2014-11-26 11:00:00 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2014-11-26 11:00:00 +0100 |
commit | cd203002035991168289ceb432c0a9c5de62374b (patch) | |
tree | 70d3514fa36b45051d5fe1cdbc49e5d299547fe7 /main/src | |
parent | 645095d513a1a8e13b5d6552b42bf8703bf2db49 (diff) |
Fix crazy NPE from Developer console
--HG--
extra : rebase_source : 258fccecffb1d5d354b5a4c5999f9a3851999e12
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java b/main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java index 3777e55c..831e3c5e 100644 --- a/main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java +++ b/main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java @@ -81,6 +81,9 @@ public class SendDumpFragment extends Fragment { long newestDumpTime=0; File newestDumpFile=null; + if (c.getCacheDir() ==null) + return null; + for(File f:c.getCacheDir().listFiles()) { if(!f.getName().endsWith(".dmp")) continue; @@ -91,8 +94,8 @@ public class SendDumpFragment extends Fragment { } } // Ignore old dumps - //if(System.currentTimeMillis() - 48 * 60 * 1000 > newestDumpTime ) - //return null; + if(System.currentTimeMillis() - 48 * 60 * 1000 > newestDumpTime ) + return null; return newestDumpFile; } |