diff options
author | John Wiegley <johnw@newartisans.com> | 2024-01-18 13:31:06 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2024-01-19 16:18:51 -0800 |
commit | a4a3cd95ef7906d1ddc76ad0b8c2b7789c18601a (patch) | |
tree | bd07846c6c8b5c300a97a5feba33e3dde7f5c220 | |
parent | 6372a7bfebff58ca438d690f7a17608e01126aa5 (diff) | |
download | fork-ledger-a4a3cd95ef7906d1ddc76ad0b8c2b7789c18601a.tar.gz fork-ledger-a4a3cd95ef7906d1ddc76ad0b8c2b7789c18601a.tar.bz2 fork-ledger-a4a3cd95ef7906d1ddc76ad0b8c2b7789c18601a.zip |
Change an assertion into an if test
-rw-r--r-- | src/history.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/history.cc b/src/history.cc index d5eb727c..ad752c55 100644 --- a/src/history.cc +++ b/src/history.cc @@ -438,7 +438,8 @@ commodity_history_impl_t::find_price(const commodity_t& source, const datetime_t& moment, const datetime_t& oldest) { - assert(source != target); + if (source == target) + return none; vertex_descriptor sv = vertex(*source.graph_index(), price_graph); vertex_descriptor tv = vertex(*target.graph_index(), price_graph); |