From 2d01367cf6d55bac4fabdd62545b75202e62412b Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 10 Apr 2023 17:46:45 -0700 Subject: [PATCH] Possible crash fix for osPiStartDma() --- src/pc/ultra_reimplementation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pc/ultra_reimplementation.c b/src/pc/ultra_reimplementation.c index 85651ef7..6cd99cc1 100644 --- a/src/pc/ultra_reimplementation.c +++ b/src/pc/ultra_reimplementation.c @@ -14,6 +14,7 @@ u64 osClockRate = 62500000; s32 osPiStartDma(UNUSED OSIoMesg *mb, UNUSED s32 priority, UNUSED s32 direction, uintptr_t devAddr, void *vAddr, size_t nbytes, UNUSED OSMesgQueue *mq) { + if (!vAddr || !devAddr) { return 0; } memcpy(vAddr, (const void *) devAddr, nbytes); return 0; }