aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-11-01 11:27:37 -0700
committerScott Jackson <daneren2005@gmail.com>2014-11-01 11:27:37 -0700
commit2565520ef21b58ff773fe94825d4456df64c6103 (patch)
treef5472e8a76358a57fcc2f731e52582892ee8777a /src/github
parent43e47ab5cfbc9f39b076a425aaa1e5c470193ff9 (diff)
downloaddsub-2565520ef21b58ff773fe94825d4456df64c6103.tar.gz
dsub-2565520ef21b58ff773fe94825d4456df64c6103.tar.bz2
dsub-2565520ef21b58ff773fe94825d4456df64c6103.zip
Fix error if val is "" for some reason
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/view/SeekBarPreference.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/view/SeekBarPreference.java b/src/github/daneren2005/dsub/view/SeekBarPreference.java
index e96d76f8..a22d049b 100644
--- a/src/github/daneren2005/dsub/view/SeekBarPreference.java
+++ b/src/github/daneren2005/dsub/view/SeekBarPreference.java
@@ -116,7 +116,11 @@ public class SeekBarPreference extends DialogPreference implements SeekBar.OnSee
SeekBar seekBar = (SeekBar)view.findViewById(R.id.seek_bar);
seekBar.setMax(mMax - mMin);
- seekBar.setProgress(Integer.parseInt(mValue));
+ try {
+ seekBar.setProgress(Integer.parseInt(mValue));
+ } catch(Exception e) {
+ seekBar.setProgress(0);
+ }
seekBar.setOnSeekBarChangeListener(this);
return view;