From d52ee8588ded78ddc364cc6fcfbf489961298816 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 7 May 2023 15:49:26 -0700 Subject: [PATCH] Fixed crash in DynOS_UpdateCmd --- data/dynos_main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/dynos_main.cpp b/data/dynos_main.cpp index 3c54c8a7a..eff0511b8 100644 --- a/data/dynos_main.cpp +++ b/data/dynos_main.cpp @@ -54,7 +54,9 @@ void *DynOS_SwapCmd(void *aCmd) { } void *DynOS_UpdateCmd(void *aCmd) { + if (!aCmd) { return; } static const uintptr_t sCmdLevelEntry[] = { CALL(0, lvl_init_or_update) }; + if (!sCmdLevelEntry) { return; } sDynosIsLevelEntry |= (memcmp(aCmd, sCmdLevelEntry, sizeof(sCmdLevelEntry)) == 0); return DynOS_Warp_Update(aCmd, sDynosIsLevelEntry); }