aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoinamountfield.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-06-30 17:32:19 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-06-30 17:32:19 +0200
commit929eb9dc6cc65d1ff47ff21dcb9fa5974a9278ee (patch)
tree088207aacb416040dd02e7b81c82476e85536cb7 /src/qt/bitcoinamountfield.cpp
parent6ed283946cc34d489e366cecb64142d551fc06f9 (diff)
show an error if amount is not valid (either the amount or decimals is empty)
Diffstat (limited to 'src/qt/bitcoinamountfield.cpp')
-rw-r--r--src/qt/bitcoinamountfield.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index 8166ce6e6e..a4cbbe0a7e 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -49,6 +49,8 @@ void BitcoinAmountField::setText(const QString &text)
QString BitcoinAmountField::text() const
{
+ if(amount->text().isEmpty() || decimals->text().isEmpty())
+ return QString();
return amount->text() + QString(".") + decimals->text();
}