Fixed a crash in the input handler caused by invalidated by hot-reload instance trying to unregister a delegate.

This commit is contained in:
Sebastian 2020-07-31 09:54:05 +01:00
parent bbc3101a58
commit 9eed8f93b9
5 changed files with 10 additions and 4 deletions

View File

@ -5,6 +5,10 @@ Versions marked as 'unofficial' are labelled only for the needs of this changelo
Change History Change History
-------------- --------------
Version: 1.21 (2020/07)
Improving stability
- Fixed a crash in the input handler caused by invalidated by hot-reload instance trying to unregister a delegate.
Version: 1.20 (2020/06) Version: 1.20 (2020/06)
Transition to IWYU and maintenance: Transition to IWYU and maintenance:
- Replaced includes of monolithic headers. - Replaced includes of monolithic headers.

View File

@ -1,7 +1,7 @@
{ {
"FileVersion": 3, "FileVersion": 3,
"Version": 1, "Version": 1,
"VersionName": "1.20", "VersionName": "1.21",
"FriendlyName": "ImGui", "FriendlyName": "ImGui",
"Description": "", "Description": "",
"Category": "Debug", "Category": "Debug",

View File

@ -9,7 +9,7 @@ Dear ImGui is an immediate-mode graphical user interface library that is very li
Status Status
------ ------
Version: 1.20 Version: 1.21
ImGui version: 1.74 ImGui version: 1.74

View File

@ -349,7 +349,9 @@ void UImGuiInputHandler::BeginDestroy()
{ {
Super::BeginDestroy(); Super::BeginDestroy();
if (ModuleManager) // To catch leftovers from modules shutdown during PIE session.
extern FImGuiModuleManager* ImGuiModuleManager;
if (ModuleManager && ModuleManager == ImGuiModuleManager)
{ {
ModuleManager->GetSettings().OnUseSoftwareCursorChanged.RemoveAll(this); ModuleManager->GetSettings().OnUseSoftwareCursorChanged.RemoveAll(this);
} }

View File

@ -31,7 +31,7 @@ struct EDelegateCategory
}; };
}; };
static FImGuiModuleManager* ImGuiModuleManager = nullptr; FImGuiModuleManager* ImGuiModuleManager = nullptr;
#if WITH_EDITOR #if WITH_EDITOR
static FImGuiEditor* ImGuiEditor = nullptr; static FImGuiEditor* ImGuiEditor = nullptr;