fix segfault at plugin-deregistration (due to #864)
The actual problem is not resolved; the pluginloader should detect the duplicate and not add the handle to the database initially. Or it should add it as "duplicate" or "alternate implementation" Which probably means we need to coder some additional corner cases. But certainly not now, we have other more important stuff to do first... we've already lost the battle against Duke Nukem Forever :-P
This commit is contained in:
parent
e02a9d213d
commit
92b06e2f03
1 changed files with 14 additions and 3 deletions
|
|
@ -189,9 +189,20 @@ lumiera_interfaceregistry_bulkremove_interfaces (LumieraInterface* self)
|
|||
TRACE (interfaceregistry, "interface %s, version %d, instance %s", (*self)->interface, (*self)->version, (*self)->name);
|
||||
|
||||
LumieraInterfacenode node = (LumieraInterfacenode) psplay_find (lumiera_interfaceregistry, *self, 0);
|
||||
REQUIRE (node->refcnt == 0, "but is %d", node->refcnt);
|
||||
|
||||
lumiera_interfacenode_delete ((LumieraInterfacenode) psplay_remove (lumiera_interfaceregistry, &node->node));
|
||||
if (node)
|
||||
{
|
||||
REQUIRE (node->refcnt == 0, "but is %d", node->refcnt);
|
||||
lumiera_interfacenode_delete ((LumieraInterfacenode) psplay_remove (lumiera_interfaceregistry, &node->node));
|
||||
}
|
||||
else
|
||||
{
|
||||
///////////TICKET #864 : should not happen but does happen in practice, e.g. when there is a copy or another library linked against that module
|
||||
/////////// Guess the pluginloader should not have added the duplicate into the interfaceregistry on discovery.
|
||||
|
||||
WARN (interfaceregistry, "ENTRY NOT FOUND in interfaceregistry at clean-up of interface %s, instance %s"
|
||||
, (*self)->interface
|
||||
, (*self)->name);
|
||||
}
|
||||
|
||||
++self;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue