From 7f009b9952078e4412e365caa91eef1b88f263b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 30 Apr 2020 10:03:11 +0200 Subject: [PATCH] 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: