summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
Diffstat (limited to 'amount.cc')
-rw-r--r--amount.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/amount.cc b/amount.cc
index 6984d9bb..d3a77044 100644
--- a/amount.cc
+++ b/amount.cc
@@ -227,8 +227,10 @@ amount * gmp_amount::street(bool get_quotes) const
{
amount * amt = copy();
- int max = 10;
+ if (! amt->commdty())
+ return amt;
+ int max = 10;
while (--max >= 0) {
if (! amt->commdty()->price && ! amt->commdty()->sought) {
if (get_quotes)