Fix some reentrancy bugs.

This commit is contained in:
David Given
2024-01-15 23:23:38 +01:00
parent 550051a688
commit 1689d58010

View File

@@ -583,6 +583,9 @@ bool Config::hasFluxSource()
std::shared_ptr<FluxSource>& Config::getFluxSource()
{
/* Ensure the config gets built (which might call us reentrantly). */
combined();
if (!_fluxSource)
{
if (!hasFluxSource())
@@ -601,6 +604,9 @@ bool Config::hasVerificationFluxSource() const
std::shared_ptr<FluxSource>& Config::getVerificationFluxSource()
{
/* Ensure the config gets built (which might call us reentrantly). */
combined();
if (!_verificationFluxSource)
{
if (!hasVerificationFluxSource())
@@ -619,6 +625,9 @@ bool Config::hasImageReader()
std::shared_ptr<ImageReader>& Config::getImageReader()
{
/* Ensure the config gets built (which might call us reentrantly). */
combined();
if (!_imageReader)
{
if (!hasImageReader())