diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-05-16 22:15:47 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-05-16 22:15:47 -0700 |
commit | 3d5395f067fdceeb3df1654eba040bcea664b85e (patch) | |
tree | c3c37038dfc94db2670efb705b2d9d2ad9b3ec85 /src/github | |
parent | 3789c6a4de68edf14d3073255f4cdc80be056832 (diff) | |
download | dsub-3d5395f067fdceeb3df1654eba040bcea664b85e.tar.gz dsub-3d5395f067fdceeb3df1654eba040bcea664b85e.tar.bz2 dsub-3d5395f067fdceeb3df1654eba040bcea664b85e.zip |
Throw error if url is null
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/activity/SettingsActivity.java | 4 |
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); |