[gtk/wip/baedert/for-master: 55/56] label: Be more defensive against non-existant focus_link



commit 7f009b9952078e4412e365caa91eef1b88f263b0
Author: Timm Bäder <mail baedert org>
Date:   Thu Apr 30 10:03:11 2020 +0200

    label: Be more defensive against non-existant focus_link

 gtk/gtklabel.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 22382ed5e5..a26e6265aa 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3849,8 +3849,14 @@ gtk_label_focus (GtkWidget        *widget,
       int new_index = -1;
       int i;
 
+      if (info->n_links == 0)
+        goto out;
+
       focus_link = gtk_label_get_focus_link (self, &focus_link_index);
 
+      if (!focus_link)
+        goto out;
+
       switch (direction)
         {
         case GTK_DIR_TAB_FORWARD:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]