diff options
Diffstat (limited to 'src/ui/messenger.c')
-rw-r--r-- | src/ui/messenger.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/ui/messenger.c b/src/ui/messenger.c index 2fc8c54..70d71b3 100644 --- a/src/ui/messenger.c +++ b/src/ui/messenger.c | |||
@@ -291,16 +291,17 @@ ui_messenger_init(MESSENGER_Application *app, | |||
291 | ); | 291 | ); |
292 | } | 292 | } |
293 | 293 | ||
294 | static void | ||
295 | _free_ui_chat_entry (gpointer user_data) | ||
296 | { | ||
297 | UI_CHAT_ENTRY_Handle* handle = (UI_CHAT_ENTRY_Handle*) user_data; | ||
298 | |||
299 | ui_chat_entry_delete(handle); | ||
300 | } | ||
301 | |||
302 | void | 294 | void |
303 | ui_messenger_cleanup(UI_MESSENGER_Handle *handle) | 295 | ui_messenger_cleanup(UI_MESSENGER_Handle *handle) |
304 | { | 296 | { |
305 | g_list_free_full(handle->chat_entries, _free_ui_chat_entry); | 297 | GList *list = handle->chat_entries; |
298 | |||
299 | while (list) { | ||
300 | if (list->data) | ||
301 | ui_chat_entry_delete((UI_CHAT_ENTRY_Handle*) list->data); | ||
302 | |||
303 | list = list->next; | ||
304 | } | ||
305 | |||
306 | g_list_free(handle->chat_entries); | ||
306 | } | 307 | } |