For all of our classes deriving from IDetailCustomization, change the call to ::UnregisterCustomClassLayout to use a saved version of the class name that we called ::RegisterCustomClassLayout with.
We don't want to access that class with ::StaticClass() during shutdown, it's already been sent to the garbage collector to be destroyed. Sometimes the GC wouldn't have gotten to it yet (and you don't crash). But other times the static class data is garbage and we'll get an access violation.
I could reproduce this 100% of the time in UE 5.4 in DebugGame, with the following UI layout...
Fixes #1363 .
For all of our classes deriving from
IDetailCustomization
, change the call to::UnregisterCustomClassLayout
to use a saved version of the class name that we called::RegisterCustomClassLayout
with.We don't want to access that class with
::StaticClass()
during shutdown, it's already been sent to the garbage collector to be destroyed. Sometimes the GC wouldn't have gotten to it yet (and you don't crash). But other times the static class data is garbage and we'll get an access violation.I could reproduce this 100% of the time in UE 5.4 in DebugGame, with the following UI layout...