@ -51,8 +51,6 @@ namespace bp = boost::process;
namespace bpt = boost : : property_tree ;
namespace bio = boost : : iostreams ;
static GncQuotes quotes_cached ;
static bool quotes_initialized = false ;
CommVec
gnc_quotes_get_quotable_commodities ( const gnc_commodity_table * table ) ;
@ -256,19 +254,3 @@ gnc_quotes_get_quotable_commodities (const gnc_commodity_table * table)
//LEAVE ("list head %p", &l);
return l ;
}
const GncQuotes & gnc_get_quotes_instance ( )
{
// The GncQuotes constructor runs check to test if Finance::Quote is properly installed
// However due to a race condition the instantiation of the static quotes_cached
// may or may not happen before binreloc has run. If binreloc didn't run, this will
// try to run gnc-fq-check from the hard-coded install dir. This will fail in all
// cases where binreloc is relevant (Windows, macOS or run from builddir).
// To catch this, explicitly reinstantiate quotes_cached at first use.
if ( ! quotes_initialized )
{
quotes_cached = GncQuotes ( ) ;
quotes_initialized = true ;
}
return quotes_cached ;
}