From 9e0bdcf147b1ceba26844195330507e6ff0619bf Mon Sep 17 00:00:00 2001 From: arrase Date: Sun, 27 Nov 2016 23:52:35 +0100 Subject: [PATCH] bug fix --- .../java/org/torproject/android/OrbotMainActivity.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java index 59dba4ba..c1e37fba 100644 --- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java +++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java @@ -623,7 +623,12 @@ public class OrbotMainActivity extends AppCompatActivity ); if (onion != null && onion.getCount() > 0) { + onion.moveToNext(); hostname = onion.getString(onion.getColumnIndex(HSContentProvider.HiddenService.NAME)); + + if(hostname == null || hostname.length() < 1) + continue; + nResult.putExtra("hs_host", hostname); if (hsKeyPath != null) { @@ -649,11 +654,10 @@ public class OrbotMainActivity extends AppCompatActivity } onion.close(); + setResult(RESULT_OK, nResult); + finish(); } } - - setResult(RESULT_OK, nResult); - finish(); } }.start();