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



commit 37035fcaa7cd895d3681399e4224fa38c7756aa5
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]