diff options
-rw-r--r-- | src/github/daneren2005/dsub/view/SeekBarPreference.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/view/SeekBarPreference.java b/src/github/daneren2005/dsub/view/SeekBarPreference.java index dedea908..e96d76f8 100644 --- a/src/github/daneren2005/dsub/view/SeekBarPreference.java +++ b/src/github/daneren2005/dsub/view/SeekBarPreference.java @@ -98,8 +98,12 @@ public class SeekBarPreference extends DialogPreference implements SeekBar.OnSee * @return A string representation of the threshold.
*/
private String getSummary(String value) {
- int val = Integer.parseInt(value);
- return String.format(mDisplay, (val + mMin) / mStepSize);
+ try {
+ int val = Integer.parseInt(value);
+ return String.format(mDisplay, (val + mMin) / mStepSize);
+ } catch (Exception e) {
+ return "";
+ }
}
@Override
|