[gnome-photos/wip/rishi/misc-fixes: 17/24] preview-nav-buttons: Be more strict about what is acceptable



commit f54a2863facc2033c55d8a6a1b96dba5f735991d
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Dec 14 20:15:05 2015 +0100

    preview-nav-buttons: Be more strict about what is acceptable

 src/photos-preview-nav-buttons.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index 282945b..f4ad411 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -568,6 +568,9 @@ photos_preview_nav_buttons_class_init (PhotosPreviewNavButtonsClass *class)
 PhotosPreviewNavButtons *
 photos_preview_nav_buttons_new (PhotosPreviewView *preview_view, GtkOverlay *overlay)
 {
+  g_return_val_if_fail (PHOTOS_IS_PREVIEW_VIEW (preview_view), NULL);
+  g_return_val_if_fail (GTK_IS_OVERLAY (overlay), NULL);
+
   return g_object_new (PHOTOS_TYPE_PREVIEW_NAV_BUTTONS, "preview-view", preview_view, "overlay", overlay, 
NULL);
 }
 


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