mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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.
This commit is contained in:
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…
Reference in New Issue
Block a user