mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Check for win callback hash before removing
This commit is contained in:
parent
b68d2ce106
commit
d2e237203c
@ -159,6 +159,7 @@ callbacks_remove(const char *const plugin_name)
|
|||||||
g_hash_table_remove(p_timed_functions, plugin_name);
|
g_hash_table_remove(p_timed_functions, plugin_name);
|
||||||
|
|
||||||
GHashTable *tag_to_win_cb_hash = g_hash_table_lookup(p_window_callbacks, plugin_name);
|
GHashTable *tag_to_win_cb_hash = g_hash_table_lookup(p_window_callbacks, plugin_name);
|
||||||
|
if (tag_to_win_cb_hash) {
|
||||||
GList *tags = g_hash_table_get_keys(tag_to_win_cb_hash);
|
GList *tags = g_hash_table_get_keys(tag_to_win_cb_hash);
|
||||||
GList *curr = tags;
|
GList *curr = tags;
|
||||||
while (curr) {
|
while (curr) {
|
||||||
@ -166,6 +167,7 @@ callbacks_remove(const char *const plugin_name)
|
|||||||
curr = g_list_next(curr);
|
curr = g_list_next(curr);
|
||||||
}
|
}
|
||||||
g_list_free(tags);
|
g_list_free(tags);
|
||||||
|
}
|
||||||
|
|
||||||
g_hash_table_remove(p_window_callbacks, plugin_name);
|
g_hash_table_remove(p_window_callbacks, plugin_name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user