From 17b7f0389a8f1968d9259a1249fa568cfe9492f5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 19 Apr 2021 13:01:48 -0400 Subject: texture_cache/util: Fix src being used instead of dst within DeduceBlitImages This line can only ever be reached if src is null, so dereferencing it here is a logic bug that slipped through. Instead, we dereference dst instead which is guaranteed to be valid. --- src/video_core/texture_cache/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index 0ab297413..8c4a5523b 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -1139,7 +1139,7 @@ void DeduceBlitImages(ImageInfo& dst_info, ImageInfo& src_info, const ImageBase* dst_info.format = src->info.format; } if (!src && dst && GetFormatType(dst->info.format) != SurfaceType::ColorTexture) { - src_info.format = src->info.format; + src_info.format = dst->info.format; } } -- cgit v1.2.3