mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
label: Fix crashes when executing a11y actions
This commit is contained in:
parent
f5e7a1d4cc
commit
d03b27b441
@ -1970,11 +1970,14 @@ gtk_label_activate_link_open (GtkWidget *widget,
|
||||
GVariant *parameter)
|
||||
{
|
||||
GtkLabel *self = GTK_LABEL (widget);
|
||||
if (self->select_info)
|
||||
{
|
||||
GtkLabelLink *link = self->select_info->context_link;
|
||||
|
||||
if (link)
|
||||
emit_activate_link (self, link);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_activate_link_copy (GtkWidget *widget,
|
||||
@ -1982,6 +1985,8 @@ gtk_label_activate_link_copy (GtkWidget *widget,
|
||||
GVariant *parameter)
|
||||
{
|
||||
GtkLabel *self = GTK_LABEL (widget);
|
||||
if (self->select_info)
|
||||
{
|
||||
GtkLabelLink *link = self->select_info->context_link;
|
||||
|
||||
if (link)
|
||||
@ -1991,8 +1996,7 @@ gtk_label_activate_link_copy (GtkWidget *widget,
|
||||
clipboard = gtk_widget_get_clipboard (widget);
|
||||
gdk_clipboard_set_text (clipboard, link->uri);
|
||||
}
|
||||
else
|
||||
g_print ("no link ?!\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user