Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Do not try to unload a plugin if it wasn't loaded at all
Marin Atanasov Nikolov committed 13 years ago
commit 4d5b0cd7b3c463b71ac258589271ed1a5b970a50
parent 8b83b68
1 file changed +6 -1
modified libpkg/plugins.c
@@ -265,7 +265,12 @@ pkg_plugins_unload(struct pkg_plugins *p)
	const char *pluginname = NULL;
	
	assert(p != NULL);
-
	assert(p->lh != NULL);
+

+
	/*
+
	 * Plugin could be enabled, but failed to be loaded
+
	 */
+
	if (p->lh == NULL)
+
		return (EPKG_OK);

	pluginfile = pkg_plugins_get(p, PKG_PLUGINS_PLUGINFILE);
	pluginname = pkg_plugins_get(p, PKG_PLUGINS_NAME);