diff -rupN gdk-pixbuf-2.31.7/gdk-pixbuf-scale.c gdk-pixbuf-2.31.7_new/gdk-pixbuf-scale.c
--- gdk-pixbuf-2.31.7/gdk-pixbuf-scale.c	2015-08-25 01:57:17.000000000 +0530
+++ gdk-pixbuf-2.31.7_new/gdk-pixbuf-scale.c	2015-09-11 17:21:23.553961896 +0530
@@ -422,6 +422,7 @@ gdk_pixbuf_rotate_simple (const GdkPixbu
   guchar *q;
   gint x, y;
 
+  g_return_val_if_fail (GDK_IS_PIXBUF (src), NULL);
   src_pixels = gdk_pixbuf_read_pixels (src);
 
   switch (angle % 360)
@@ -526,6 +527,7 @@ gdk_pixbuf_flip (const GdkPixbuf *src,
   guchar *q;
   gint x, y;
 
+  g_return_val_if_fail (GDK_IS_PIXBUF (src), NULL);
   dest = gdk_pixbuf_new (src->colorspace, 
 			 src->has_alpha, 
 			 src->bits_per_sample, 
diff -rupN gdk-pixbuf-2.31.7/gdk-pixbuf-util.c gdk-pixbuf-2.31.7_new/gdk-pixbuf-util.c
--- gdk-pixbuf-2.31.7/gdk-pixbuf-util.c	2015-08-25 01:57:16.000000000 +0530
+++ gdk-pixbuf-2.31.7_new/gdk-pixbuf-util.c	2015-09-11 17:21:41.474882764 +0530
@@ -282,7 +282,8 @@ gdk_pixbuf_saturate_and_pixelate(const G
  * appropriate transform will be performed so that the pixbuf
  * is oriented correctly.
  *
- * Return value: (transfer full): A newly-created pixbuf, or a reference to the
+ * Return value: (transfer full): A newly-created pixbuf, or NULL if 
+ * not enough memory could be allocated for it,or a reference to the
  * input pixbuf (with an increased reference count).
  *
  * Since: 2.12
