aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-log-manager.c7
-rw-r--r--libempathy/empathy-log-store-empathy.c2
2 files changed, 3 insertions, 6 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;
diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c
index 5d370bf9f..c35a403d6 100644
--- a/libempathy/empathy-log-store-empathy.c
+++ b/libempathy/empathy-log-store-empathy.c
@@ -736,7 +736,7 @@ log_store_empathy_get_filtered_messages (EmpathyLogStore *self,
if (!filter (n->data, user_data))
{
g_object_unref (n->data);
- new_messages = g_list_remove (new_messages, n->data);
+ new_messages = g_list_delete_link (new_messages, n);
}
n = next;
}