[gnome-photos] thumbnail-factory: Be more strict about what is acceptable



commit 3d6e692a93e47e36ef646345a9ab28df1e97c2af
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jul 13 17:10:24 2017 +0200

    thumbnail-factory: Be more strict about what is acceptable

 src/photos-thumbnail-factory.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-thumbnail-factory.c b/src/photos-thumbnail-factory.c
index 90fbabc..bc84500 100644
--- a/src/photos-thumbnail-factory.c
+++ b/src/photos-thumbnail-factory.c
@@ -357,6 +357,9 @@ photos_thumbnail_factory_initable_iface_init (GInitableIface *iface)
 PhotosThumbnailFactory *
 photos_thumbnail_factory_dup_singleton (GCancellable *cancellable, GError **error)
 {
+  g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+  g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
   return g_initable_new (PHOTOS_TYPE_THUMBNAIL_FACTORY, cancellable, error, NULL);
 }
 


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