[cheese] Avoid warnings with no pixbuf in UmCropArea



commit 3f3c4ceffc4cc058dfbd07ddfed720c833f8a974
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Oct 25 12:31:41 2013 +0200

    Avoid warnings with no pixbuf in UmCropArea
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710874

 libcheese/um-crop-area.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libcheese/um-crop-area.c b/libcheese/um-crop-area.c
index 60ca9be..3e1fdde 100644
--- a/libcheese/um-crop-area.c
+++ b/libcheese/um-crop-area.c
@@ -922,6 +922,9 @@ um_crop_area_get_picture (UmCropArea *area)
 {
         gint width, height;
 
+        if (area->priv->browse_pixbuf == NULL)
+                return NULL;
+
         width = gdk_pixbuf_get_width (area->priv->browse_pixbuf);
         height = gdk_pixbuf_get_height (area->priv->browse_pixbuf);
         width = MIN (area->priv->crop.width, width - area->priv->crop.x);


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