[gimp] app: even for fallback icons, it is better to check lookup success.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: even for fallback icons, it is better to check lookup success.
- Date: Sun, 24 Jun 2018 15:28:56 +0000 (UTC)
commit 877c20f420749aa30d4a144823f2c167d129784e
Author: Jehan <jehan girinstud io>
Date: Sun Jun 24 17:27:36 2018 +0200
app: even for fallback icons, it is better to check lookup success.
app/widgets/gimpwidgets-utils.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index 900838532f..f2a9084d1f 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -372,9 +372,10 @@ gimp_widget_load_icon (GtkWidget *widget,
size, scale_factor,
GTK_ICON_LOOKUP_GENERIC_FALLBACK);
- pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info,
- gtk_widget_get_style_context (widget),
- NULL, NULL);
+ if (icon_info)
+ pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info,
+ gtk_widget_get_style_context (widget),
+ NULL, NULL);
}
else
{
@@ -398,9 +399,10 @@ gimp_widget_load_icon (GtkWidget *widget,
size, scale_factor,
GTK_ICON_LOOKUP_GENERIC_FALLBACK);
- pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info,
- gtk_widget_get_style_context (widget),
- NULL, NULL);
+ if (icon_info)
+ pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info,
+ gtk_widget_get_style_context (widget),
+ NULL, NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]