Ignore attempts to annotate the null commodity
Fixes 04C5E1CA-1B39-4214-81C7-FD5AA785308F
This commit is contained in:
parent
c9719006be
commit
d45b35798c
1 changed files with 1 additions and 1 deletions
|
|
@ -740,7 +740,7 @@ void amount_t::annotate(const annotation_t& details)
|
||||||
if (! quantity)
|
if (! quantity)
|
||||||
throw_(amount_error, _("Cannot annotate the commodity of an uninitialized amount"));
|
throw_(amount_error, _("Cannot annotate the commodity of an uninitialized amount"));
|
||||||
else if (! has_commodity())
|
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) {
|
if (commodity().annotated) {
|
||||||
this_ann = &as_annotated_commodity(commodity());
|
this_ann = &as_annotated_commodity(commodity());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue