summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2024-01-18 13:31:06 -0800
committerJohn Wiegley <johnw@newartisans.com>2024-01-19 16:18:51 -0800
commita4a3cd95ef7906d1ddc76ad0b8c2b7789c18601a (patch)
treebd07846c6c8b5c300a97a5feba33e3dde7f5c220
parent6372a7bfebff58ca438d690f7a17608e01126aa5 (diff)
downloadfork-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.cc3
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);