diff options
-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); |