From e5cb942c4a5e1b8d52735f81b72ea1090d5e482b Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Mon, 19 Feb 2024 00:00:38 -0500 Subject: [PATCH] SceneDataStore: handle null --- src/hollow_knight_memory.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hollow_knight_memory.rs b/src/hollow_knight_memory.rs index aa358a80..2be034f2 100644 --- a/src/hollow_knight_memory.rs +++ b/src/hollow_knight_memory.rs @@ -3342,6 +3342,9 @@ impl SceneDataStore { let offsets = gmf.scene_data_pointers.offsets(prc, &gmf.module, &gmf.image)?; let mut killed = 0; for pbi in list_object_iter(prc, &gmf.string_list_offests, pbis)? { + if pbi.is_null() { + continue; + } let scene_addr = prc.read_pointer(pbi + offsets.persistentbooldata_scenename, gmf.string_list_offests.pointer_size).ok()?; let scene_str = read_string_object::(prc, &gmf.string_list_offests, scene_addr)?; if !scene_str.starts_with("RestingGrounds_08") {