mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::mods: Fix missing reference count condition for children on unload(). (closes #109)
This commit is contained in:
parent
d8bfacd128
commit
ff813ebea6
1 changed files with 2 additions and 1 deletions
|
@ -97,7 +97,8 @@ ircd::mods::unload(mod &mod)
|
|||
(auto *const &ptr)
|
||||
{
|
||||
assert(ptr);
|
||||
return shared_from(*ptr);
|
||||
const auto ret(shared_from(*ptr));
|
||||
return ret.use_count() > 2? ret : std::shared_ptr<mods::mod>{};
|
||||
});
|
||||
|
||||
// Call the user's unloading function here.
|
||||
|
|
Loading…
Reference in a new issue