[gnome-photos] preview-nav-buttons: Be more strict about what is acceptable



commit 155a396f170738ebe9800ebc8a89e9edf213df28
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
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746940

 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]