[gnome-photos/wip/rishi/assert-more: 6/6] delete-item-job: Be more strict about what is acceptable




commit 1059d8d3628d55161fe94c484cb0c640e20f6bb5
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Mar 14 18:45:17 2021 +0100

    delete-item-job: Be more strict about what is acceptable
    
    https://gitlab.gnome.org/GNOME/gnome-photos/-/merge_requests/179

 src/photos-delete-item-job.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/photos-delete-item-job.c b/src/photos-delete-item-job.c
index ec9b43f7..8d18b5af 100644
--- a/src/photos-delete-item-job.c
+++ b/src/photos-delete-item-job.c
@@ -169,6 +169,9 @@ photos_delete_item_job_run (PhotosDeleteItemJob *self,
   g_autoptr (PhotosQuery) query = NULL;
   PhotosSearchContextState *state;
 
+  g_return_if_fail (PHOTOS_IS_DELETE_ITEM_JOB (self));
+  g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
   task = g_task_new (self, cancellable, callback, user_data);
   g_task_set_source_tag (task, photos_delete_item_job_run);
 


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