[gtk/wip/baedert/for-master: 114/146] icontheme: Annotate return value of load_icon as nullable
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 114/146] icontheme: Annotate return value of load_icon as nullable
- Date: Mon, 9 Sep 2019 14:41:18 +0000 (UTC)
commit fa87d5b783f1fc329c185b50888e672f280ba169
Author: Timm Bäder <mail baedert org>
Date: Fri Aug 30 04:14:22 2019 +0200
icontheme: Annotate return value of load_icon as nullable
It returns NULL in the error case.
gtk/gtkicontheme.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 48e3968343..edf61e4a6b 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -3758,10 +3758,11 @@ proxy_pixbuf_destroy (guchar *pixels, gpointer data)
* the #GtkIconInfo. If this flag has been specified, the pixbuf
* returned by this function will be scaled to the exact size.
*
- * Returns: (transfer full): the rendered icon; this may be a newly
+ * Returns: (transfer full) (nullable): the rendered icon; this may be a newly
* created icon or a new reference to an internal icon, so you must
* not modify the icon. Use g_object_unref() to release your reference
* to the icon.
+ * If the icon could not be loaded, %NULL is returned and @error is set.
*/
GdkPixbuf *
gtk_icon_info_load_icon (GtkIconInfo *icon_info,
@@ -3779,12 +3780,12 @@ gtk_icon_info_load_icon (GtkIconInfo *icon_info,
}
else
{
- g_set_error_literal (error,
- GTK_ICON_THEME_ERROR,
+ g_set_error_literal (error,
+ GTK_ICON_THEME_ERROR,
GTK_ICON_THEME_NOT_FOUND,
_("Failed to load icon"));
}
-
+
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]