diff --git a/osrng.cpp b/osrng.cpp index 0619b34d..6d36aaea 100644 --- a/osrng.cpp +++ b/osrng.cpp @@ -146,7 +146,7 @@ void NonblockingRng::GenerateBlock(byte *output, size_t size) { #ifdef CRYPTOPP_WIN32_AVAILABLE // Acquiring a provider is expensive. Do it once and retain the reference. - static const MicrosoftCryptoProvider &hProvider = Singleton().Ref(); + const MicrosoftCryptoProvider &hProvider = Singleton().Ref(); # if defined(USE_MS_CRYPTOAPI) if (!CryptGenRandom(hProvider.GetProviderHandle(), (DWORD)size, output)) throw OS_RNG_Err("CryptGenRandom");