[gnome-photos] application: Be more assertive about programmer errors



commit 71035d48bca078b335e579728a48b56f4a5611b7
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jul 14 00:10:53 2016 +0200

    application: Be more assertive about programmer errors

 src/photos-application.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index ddc5852..96d6062 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -926,6 +926,7 @@ photos_application_refresh_db (GObject *source_object, GAsyncResult *res, gpoint
 {
   PhotosApplication *self = PHOTOS_APPLICATION (user_data);
   GError *error;
+  GList *miner_link;
   GomMiner *miner = GOM_MINER (source_object);
   PhotosApplicationRefreshData *data;
   gpointer refresh_miner_id_data;
@@ -934,7 +935,10 @@ photos_application_refresh_db (GObject *source_object, GAsyncResult *res, gpoint
   refresh_miner_id_data = g_hash_table_lookup (self->refresh_miner_ids, miner);
   g_assert_null (refresh_miner_id_data);
 
-  self->miners_running = g_list_remove (self->miners_running, miner);
+  miner_link = g_list_find (self->miners_running, miner);
+  g_assert_nonnull (miner_link);
+
+  self->miners_running = g_list_remove_link (self->miners_running, miner_link);
   g_signal_emit (self, signals[MINERS_CHANGED], 0, self->miners_running);
 
   error = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]