diff --git a/modules/core/src/rand.cpp b/modules/core/src/rand.cpp index c985fac5a3..9bfc91d931 100644 --- a/modules/core/src/rand.cpp +++ b/modules/core/src/rand.cpp @@ -736,7 +736,7 @@ cv::RNG& cv::theRNG() void cv::setRNGSeed(int seed) { - getCoreTlsData().get()->rng.state = static_cast(seed); + theRNG() = RNG(static_cast(seed)); }