aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-05-16 22:15:47 -0700
committerScott Jackson <daneren2005@gmail.com>2014-05-16 22:15:47 -0700
commit3d5395f067fdceeb3df1654eba040bcea664b85e (patch)
treec3c37038dfc94db2670efb705b2d9d2ad9b3ec85 /src/github/daneren2005
parent3789c6a4de68edf14d3073255f4cdc80be056832 (diff)
downloaddsub-3d5395f067fdceeb3df1654eba040bcea664b85e.tar.gz
dsub-3d5395f067fdceeb3df1654eba040bcea664b85e.tar.bz2
dsub-3d5395f067fdceeb3df1654eba040bcea664b85e.zip
Throw error if url is null
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/activity/SettingsActivity.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/activity/SettingsActivity.java b/src/github/daneren2005/dsub/activity/SettingsActivity.java
index 530733a5..d62c3769 100644
--- a/src/github/daneren2005/dsub/activity/SettingsActivity.java
+++ b/src/github/daneren2005/dsub/activity/SettingsActivity.java
@@ -586,6 +586,10 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
private void openInBrowser(final int instance) {
SharedPreferences prefs = Util.getPreferences(this);
String url = prefs.getString(Constants.PREFERENCES_KEY_SERVER_URL + instance, null);
+ if(url == null) {
+ new ErrorDialog(SettingsActivity.this, R.string.settings_invalid_url, false);
+ return;
+ }
Uri uriServer = Uri.parse(url);
Intent browserIntent = new Intent(Intent.ACTION_VIEW, uriServer);