[gtk: 1/2] Don't crash when updating the icon on a `GtkScaleButton` with a non-`NULL` empty icon list
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] Don't crash when updating the icon on a `GtkScaleButton` with a non-`NULL` empty icon list
- Date: Tue, 22 Feb 2022 19:39:33 +0000 (UTC)
commit 3f329b2d0f11ff7b30120bed4be0a0fb94d8d178
Author: Sebastian Dröge <sebastian centricular com>
Date: Sun Feb 13 11:16:32 2022 +0200
Don't crash when updating the icon on a `GtkScaleButton` with a non-`NULL` empty icon list
gtk/gtkscalebutton.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c
index 2012cf49d2..311ea01192 100644
--- a/gtk/gtkscalebutton.c
+++ b/gtk/gtkscalebutton.c
@@ -884,7 +884,7 @@ gtk_scale_button_update_icon (GtkScaleButton *button)
const char *name;
guint num_icons;
- if (!priv->icon_list || priv->icon_list[0][0] == '\0')
+ if (!priv->icon_list || !priv->icon_list[0] || priv->icon_list[0][0] == '\0')
{
gtk_button_set_icon_name (GTK_BUTTON (priv->button), "image-missing");
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]