[gtk/wip/baedert/for-master: 4/5] label: Be more defensive against non-existant focus_link
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 4/5] label: Be more defensive against non-existant focus_link
- Date: Thu, 30 Apr 2020 09:04:43 +0000 (UTC)
commit 38e4e6d90cbc1d5bf08b04635f4c5da1e7d1defc
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]