summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.cc')
-rw-r--r--src/value.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/value.cc b/src/value.cc
index 5c05c437..d39597bd 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1143,19 +1143,19 @@ value_t value_t::value(const bool primary_only,
{
switch (type()) {
case INTEGER:
- return *this;
+ return NULL_VALUE;
case AMOUNT:
if (optional<amount_t> val =
as_amount().value(primary_only, moment, in_terms_of))
return *val;
- return *this;
+ return NULL_VALUE;
case BALANCE:
if (optional<balance_t> bal =
as_balance().value(primary_only, moment, in_terms_of))
return *bal;
- return *this;
+ return NULL_VALUE;
default:
break;