Guard against null strings

Change-Id: I165c9fee57c0605b95751cc5875e6e6142e2001b
CR-Fixed: SWE-6070
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index 00f3c44..1d647d1 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -18,6 +18,7 @@
 
 import android.net.Uri;
 import android.os.Bundle;
+import android.text.TextUtils;
 import android.util.Log;
 
 import org.codeaurora.swe.GeolocationPermissions;
@@ -47,9 +48,11 @@
      */
     public void findAndReload(String origin) {
         for (Tab tab : mTabs){
-            if (tab.getWebView() != null) {
-                Uri url = Uri.parse(tab.getWebView().getUrl());
-                if (url.getHost().equals(origin)){
+            WebView wv = tab.getWebView();
+            if (wv != null && !TextUtils.isEmpty(wv.getUrl())) {
+                Uri url = Uri.parse(wv.getUrl());
+                if ((url != null && url.getHost() != null) &&
+                        url.getHost().equals(origin) ) {
                     tab.getWebView().reload();
                 }
             }