catch NPE (#655)
This commit is contained in:
parent
b978396a38
commit
9c921183ab
|
@ -68,6 +68,9 @@ public class ExchangeEditText extends LinearLayout {
|
|||
}
|
||||
boolean ok = true;
|
||||
String nativeAmount = getNativeAmount();
|
||||
if (nativeAmount == null) {
|
||||
ok = false;
|
||||
} else {
|
||||
try {
|
||||
double amount = Double.parseDouble(nativeAmount);
|
||||
if ((amount < min) || (amount > max)) {
|
||||
|
@ -78,6 +81,7 @@ public class ExchangeEditText extends LinearLayout {
|
|||
Timber.e(ex.getLocalizedMessage());
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if (!ok) {
|
||||
shakeAmountField();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue