summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-03-09 20:36:52 +0100
committerbunnei <bunneidev@gmail.com>2019-03-21 03:36:03 +0100
commit19330f45d3d0efbf490a436c8689f30c4fc79e44 (patch)
tree59080c865990886517466db9e76a29b6c7f5cea7
parentmemory_manager: Add protections for invalid GPU addresses. (diff)
downloadyuzu-19330f45d3d0efbf490a436c8689f30c4fc79e44.tar
yuzu-19330f45d3d0efbf490a436c8689f30c4fc79e44.tar.gz
yuzu-19330f45d3d0efbf490a436c8689f30c4fc79e44.tar.bz2
yuzu-19330f45d3d0efbf490a436c8689f30c4fc79e44.tar.lz
yuzu-19330f45d3d0efbf490a436c8689f30c4fc79e44.tar.xz
yuzu-19330f45d3d0efbf490a436c8689f30c4fc79e44.tar.zst
yuzu-19330f45d3d0efbf490a436c8689f30c4fc79e44.zip
-rw-r--r--src/video_core/engines/maxwell_dma.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp
index a0ded4c25..5cca5c29a 100644
--- a/src/video_core/engines/maxwell_dma.cpp
+++ b/src/video_core/engines/maxwell_dma.cpp
@@ -88,6 +88,16 @@ void MaxwellDMA::HandleCopy() {
auto source_ptr{memory_manager.GetPointer(source)};
auto dst_ptr{memory_manager.GetPointer(dest)};
+ if (!source_ptr) {
+ LOG_ERROR(HW_GPU, "source_ptr is invalid");
+ return;
+ }
+
+ if (!dst_ptr) {
+ LOG_ERROR(HW_GPU, "dst_ptr is invalid");
+ return;
+ }
+
const auto FlushAndInvalidate = [&](u32 src_size, u64 dst_size) {
// TODO(Subv): For now, manually flush the regions until we implement GPU-accelerated
// copying.