From 3a60f19eaf71b9eead03a51a4af4beaebc75433f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 15 Apr 2020 22:20:03 -0400 Subject: gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator Avoids potential invalid junk data from being read. --- src/video_core/renderer_opengl/gl_query_cache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core/renderer_opengl') diff --git a/src/video_core/renderer_opengl/gl_query_cache.cpp b/src/video_core/renderer_opengl/gl_query_cache.cpp index f12e9f55f..d7ba57aca 100644 --- a/src/video_core/renderer_opengl/gl_query_cache.cpp +++ b/src/video_core/renderer_opengl/gl_query_cache.cpp @@ -94,9 +94,9 @@ CachedQuery::CachedQuery(CachedQuery&& rhs) noexcept : VideoCommon::CachedQueryBase(std::move(rhs)), cache{rhs.cache}, type{rhs.type} {} CachedQuery& CachedQuery::operator=(CachedQuery&& rhs) noexcept { - VideoCommon::CachedQueryBase::operator=(std::move(rhs)); cache = rhs.cache; type = rhs.type; + CachedQueryBase::operator=(std::move(rhs)); return *this; } -- cgit v1.2.3