GIcon: NULLify the `type' out param in the sync methods too
authorEmanuele Aina <emanuele.aina@collabora.com>
Mon, 20 May 2013 14:53:40 +0000 (15:53 +0100)
committerEmanuele Aina <emanuele.aina@collabora.com>
Tue, 28 May 2013 20:59:24 +0000 (22:59 +0200)
Both g_[file|bytes]_icon_load() leave the `type' out parameter
untouched, while the async methods g_[file|bytes]_icon_load_finish()
always set it to NULL.

For consistency's sake NULLify it in the sync methods too.

https://bugzilla.gnome.org/show_bug.cgi?id=700725

gio/gbytesicon.c
gio/gfileicon.c

index dea13cc..801d93a 100644 (file)
@@ -223,6 +223,9 @@ g_bytes_icon_load (GLoadableIcon  *icon,
 {
   GBytesIcon *bytes_icon = G_BYTES_ICON (icon);
 
+  if (type)
+    *type = NULL;
+
   return g_memory_input_stream_new_from_bytes (bytes_icon->bytes);
 }
 
index 232392f..0778107 100644 (file)
@@ -288,6 +288,9 @@ g_file_icon_load (GLoadableIcon  *icon,
   stream = g_file_read (file_icon->file,
                        cancellable,
                        error);
+
+  if (stream && type)
+    *type = NULL;
   
   return G_INPUT_STREAM (stream);
 }