Skip to content

Commit 63dd83e

Browse files
committed
Fix FaultyFileDetector crash
1 parent 8dc91e6 commit 63dd83e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/mods/FaultyFileDetector.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,11 @@ bool FaultyFileDetector::scan_resource_process_parse_and_hook() {
340340
m_resource_open_failed_hook = std::move(hook);
341341
break;
342342
} else {
343-
spdlog::warn("[FaultyFileDetector]: Failed to find resource stream failed check after using resource path at 0x{:X}", (uintptr_t)using_resource_path_offset.value());
343+
if (using_resource_path_offset.has_value()) {
344+
spdlog::warn("[FaultyFileDetector]: Failed to find resource stream failed check after using resource path at 0x{:X}", (uintptr_t)using_resource_path_offset.value());
345+
} else {
346+
spdlog::warn("[FaultyFileDetector]: Failed to find usage of resource path string at 0x{:X}", (uintptr_t)possible_get_next_resource_to_process_call.value());
347+
}
344348
}
345349
}
346350
}

0 commit comments

Comments
 (0)