Skip to content

Commit 791570e

Browse files
committed
keep unloading dependant addons regardless of unload results
1 parent c5b9782 commit 791570e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

loader_core/gw2al_api_addon_registry.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ gw2al_api_ret gw2al_core__unload_addon(gw2al_hashed_name name)
6161
LOG_DEBUG(L"core", L"Unloading addon %s", addon->desc->name);
6262

6363
unsigned short i;
64+
bool pendingDeps = false;
6465

6566
gw2al_addon** list = addonStorage.get_array(&i);
6667

@@ -71,7 +72,6 @@ gw2al_api_ret gw2al_core__unload_addon(gw2al_hashed_name name)
7172
--i;
7273
continue;
7374
}
74-
7575

7676
gw2al_addon_dsc* depList = list[i]->desc->dependList;
7777

@@ -83,7 +83,7 @@ gw2al_api_ret gw2al_core__unload_addon(gw2al_hashed_name name)
8383
if (name == gw2al_core__hash_name((wchar_t*)depList[j].name))
8484
{
8585
if (gw2al_core__unload_addon(gw2al_core__hash_name((wchar_t*)list[i]->desc->name)) != GW2AL_OK)
86-
return GW2AL_DEP_STILL_LOADED;
86+
pendingDeps = true;
8787
break;
8888
}
8989
++j;
@@ -94,6 +94,9 @@ gw2al_api_ret gw2al_core__unload_addon(gw2al_hashed_name name)
9494
--i;
9595
}
9696

97+
if (pendingDeps)
98+
return GW2AL_DEP_STILL_LOADED;
99+
97100
gw2al_api_ret ret = addon->unload(loader_core::instance.GetCurrentState() != LDR_INGAME);
98101

99102
if (ret == GW2AL_OK)

loader_core/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

33
#define LOADER_CORE_VER_MAJOR 0
4-
#define LOADER_CORE_VER_MINOR 2
4+
#define LOADER_CORE_VER_MINOR 3
55
#define LOADER_CORE_VER_REV BUILD_VERSION_REV
66
#define LOADER_CORE_VER_NAME BUILD_VERSION_NAME

0 commit comments

Comments
 (0)