1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

Merge pull request #995 from philipflohr/plugins_unload_all

let plugins_unload_all fail if one plugin unload operation fails
This commit is contained in:
Michael Vetter 2019-02-20 10:22:49 +01:00 committed by GitHub
commit fbbf920e2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,7 +270,7 @@ plugins_load(const char *const name)
gboolean gboolean
plugins_unload_all(void) plugins_unload_all(void)
{ {
gboolean result = FALSE; gboolean result = TRUE;
GList *plugin_names = g_hash_table_get_keys(plugins); GList *plugin_names = g_hash_table_get_keys(plugins);
GList *plugin_names_dup = NULL; GList *plugin_names_dup = NULL;
GList *curr = plugin_names; GList *curr = plugin_names;
@ -282,8 +282,8 @@ plugins_unload_all(void)
curr = plugin_names_dup; curr = plugin_names_dup;
while (curr) { while (curr) {
if (plugins_unload(curr->data)) { if (!plugins_unload(curr->data)) {
result = TRUE; result = FALSE;
} }
curr = g_list_next(curr); curr = g_list_next(curr);
} }