1
0
mirror of synced 2025-01-31 03:53:44 +01:00

fix: Window title not resetting when closing all providers

This commit is contained in:
WerWolv 2023-01-04 14:24:18 +01:00
parent 9a5881fc47
commit e6d14507e2

View File

@ -312,13 +312,13 @@ namespace hex {
EventManager::post<EventProviderDeleted>(provider);
if (s_providers.empty())
EventManager::post<EventProviderChanged>(provider, nullptr);
else if (it - s_providers.begin() == s_currentProvider)
if (!s_providers.empty() && it - s_providers.begin() == s_currentProvider)
setCurrentProvider(0);
s_providers.erase(it);
if (s_providers.empty())
EventManager::post<EventProviderChanged>(provider, nullptr);
provider->close();
EventManager::post<EventProviderClosed>(provider);