0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd::mods: Fix missing reference count condition for children on unload(). (closes #109)

This commit is contained in:
Jason Volk 2019-09-26 10:41:21 -07:00
parent d8bfacd128
commit ff813ebea6

View file

@ -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.