Prevent throw in gnc-pricedb.

If a price lookup is given an invalid time64/timespec (i.e. INT64_MAX)
then just return NULL instead of trying to find the nearest price.
pull/339/head
John Ralls 8 years ago
parent 16ba1e39b1
commit 85cc574d50

@ -2348,6 +2348,7 @@ lookup_nearest_in_time(GNCPriceDB *db,
GList *item = NULL;
if (!db || !c || !currency) return NULL;
if (t.tv_sec == INT64_MAX) return NULL;
ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
price_list = pricedb_get_prices_internal (db, c, currency, TRUE);
if (!price_list) return NULL;

Loading…
Cancel
Save