Skip to content

Commit ff166b4

Browse files
committed
VR: Possible fix for crash on exit when accessing statics
1 parent 3e196b3 commit ff166b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mods/vr/FFakeStereoRenderingHook.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3800,10 +3800,10 @@ bool FFakeStereoRenderingHook::setup_view_extensions() try {
38003800

38013801
// Add a vectored exception handler that catches attempted dereferences of a null XRSystem or HMDDevice
38023802
// The exception handler will then patch out the instructions causing the crash and continue execution
3803-
static std::vector<Patch::Ptr> xrsystem_patches{};
3804-
static std::unordered_set<uintptr_t> ignored_addresses{};
3805-
38063803
AddVectoredExceptionHandler(1, [](PEXCEPTION_POINTERS exception) -> LONG {
3804+
static std::vector<Patch::Ptr> xrsystem_patches{};
3805+
static std::unordered_set<uintptr_t> ignored_addresses{};
3806+
38073807
if (exception->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) {
38083808
const auto exception_address = exception->ContextRecord->Rip;
38093809

0 commit comments

Comments
 (0)