aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-log-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/empathy-log-manager.c')
-rw-r--r--libempathy/empathy-log-manager.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libempathy/empathy-log-manager.c b/libempathy/empathy-log-manager.c
index beded4c21..78f5c15eb 100644
--- a/libempathy/empathy-log-manager.c
+++ b/libempathy/empathy-log-manager.c
@@ -313,11 +313,8 @@ empathy_log_manager_get_filtered_messages (EmpathyLogManager *manager,
for (i = 0; out_size - i > num_messages; i++)
{
- EmpathyMessage *message;
-
- message = out->data;
- out = g_list_remove (out, message);
- g_object_unref (message);
+ g_object_unref (out->data);
+ out = g_list_delete_link (out, out);
}
return out;