From d45b35798cfd6f0aa72889455f9a87502cd00469 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 15 Jun 2009 17:01:55 +0100 Subject: Ignore attempts to annotate the null commodity Fixes 04C5E1CA-1B39-4214-81C7-FD5AA785308F --- src/amount.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amount.cc b/src/amount.cc index 7c9a6931..a58cc215 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -740,7 +740,7 @@ void amount_t::annotate(const annotation_t& details) if (! quantity) throw_(amount_error, _("Cannot annotate the commodity of an uninitialized amount")); else if (! has_commodity()) - throw_(amount_error, _("Cannot annotate an amount with no commodity")); + return; // ignore attempt to annotate a "bare commodity if (commodity().annotated) { this_ann = &as_annotated_commodity(commodity()); -- cgit v1.2.3