From a4a3cd95ef7906d1ddc76ad0b8c2b7789c18601a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 18 Jan 2024 13:31:06 -0800 Subject: Change an assertion into an if test --- src/history.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3