summaryrefslogtreecommitdiffstats
path: root/modules.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules.c')
-rw-r--r--modules.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules.c b/modules.c
index ffedc644..21141031 100644
--- a/modules.c
+++ b/modules.c
@@ -407,12 +407,17 @@ static rsRetVal modUnloadAndDestructDynamic(void)
pModCurr = pMod;
pMod = GetNxt(pModCurr); /* get next */
/* now we can destroy the previous module */
- if(pModCurr->eLinkType != eMOD_LINK_STATIC) {
- modUnlinkAndDestroy(pModCurr, pModPrev);
+ /* TODO: library modules are currently never unloaded! */
+ if(pModCurr->eType == eMOD_LIB) {
+ dbgprintf("NOT unloading library module %s\n", modGetName(pModCurr));
} else {
- pModPrev = pModCurr; /* don't delete, so this is the new prev ptr */
- }
+ if(pModCurr->eLinkType != eMOD_LINK_STATIC) {
+ modUnlinkAndDestroy(pModCurr, pModPrev);
+ } else {
+ pModPrev = pModCurr; /* don't delete, so this is the new prev ptr */
+ }
}
+ }
RETiRet;
}