From 25e897a0523713ce2ef47bb692b9119b0d4414a1 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 8 Jan 2024 17:45:08 -0800 Subject: [PATCH] small fix for crash --- Launcher/Config.h | 2 +- Module/UIPlayer.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Launcher/Config.h b/Launcher/Config.h index 88d0bd2..c6ba491 100644 --- a/Launcher/Config.h +++ b/Launcher/Config.h @@ -6,7 +6,7 @@ #include // The current version of RBSE -#define RBSE_VERSION "3.8.2" +#define RBSE_VERSION "3.8.3" // maximum length of output file names #define MAX_OUTFILE_NAME_LEN 64 // maximum length of output formats diff --git a/Module/UIPlayer.cpp b/Module/UIPlayer.cpp index bd0fa69..5fb2fc8 100644 --- a/Module/UIPlayer.cpp +++ b/Module/UIPlayer.cpp @@ -90,9 +90,18 @@ uint32_t djplayer_uiplayer::getDeckBPM() // change anytime new devices are added -- which seems not uncommon bpm_device_offset = find_device_offset("@BPM"); } + if (!bpm_device_offset) { + break; + } bpmDevice = *(void **)((uintptr_t)this + bpm_device_offset); + if (!bpmDevice) { + break; + } // then the offsets for the bpm within the device should never change bpmDeviceInner = *(void **)((uintptr_t)bpmDevice + 0x80); + if (!bpmDeviceInner) { + break; + } bpm = *(uint32_t *)((uintptr_t)bpmDeviceInner + 0x154); break; }