diff options
| author | Lioncash <mathew1800@gmail.com> | 2021-04-19 13:01:48 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2021-04-19 13:01:50 -0400 |
| commit | c81f95a54b2da08e06591fbbf12518f54421e74f (patch) | |
| tree | 468ca03357bd6a11132364e2f9334727d7abbf84 /src/video_core/texture_cache/util.cpp | |
| parent | af61e8d1abe142844a4e2eda5ec5196ea0b6ecc6 (diff) | |
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.
Diffstat (limited to 'src/video_core/texture_cache/util.cpp')
| -rw-r--r-- | src/video_core/texture_cache/util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index 0ab297413d..8c4a5523b3 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; } } |
