mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 12:25:48 +01:00
GIcon: NULLify the `type' out param in the sync methods too
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
This commit is contained in:
parent
7a861ab4c9
commit
3382ac99be
@ -223,6 +223,9 @@ g_bytes_icon_load (GLoadableIcon *icon,
|
|||||||
{
|
{
|
||||||
GBytesIcon *bytes_icon = G_BYTES_ICON (icon);
|
GBytesIcon *bytes_icon = G_BYTES_ICON (icon);
|
||||||
|
|
||||||
|
if (type)
|
||||||
|
*type = NULL;
|
||||||
|
|
||||||
return g_memory_input_stream_new_from_bytes (bytes_icon->bytes);
|
return g_memory_input_stream_new_from_bytes (bytes_icon->bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,6 +288,9 @@ g_file_icon_load (GLoadableIcon *icon,
|
|||||||
stream = g_file_read (file_icon->file,
|
stream = g_file_read (file_icon->file,
|
||||||
cancellable,
|
cancellable,
|
||||||
error);
|
error);
|
||||||
|
|
||||||
|
if (stream && type)
|
||||||
|
*type = NULL;
|
||||||
|
|
||||||
return G_INPUT_STREAM (stream);
|
return G_INPUT_STREAM (stream);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user