mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
Avoid a possible crash in ::activate-url handlers
If the signal handler ends up changing the label text, the link is no longer around to update the css node. Check for this possibility to avoid a crash here.
This commit is contained in:
parent
715801f302
commit
7e6820415d
@ -6611,7 +6611,8 @@ emit_activate_link (GtkLabel *label,
|
||||
GtkStateFlags state;
|
||||
|
||||
g_signal_emit (label, signals[ACTIVATE_LINK], 0, link->uri, &handled);
|
||||
if (handled && priv->track_links && !link->visited)
|
||||
if (handled && priv->track_links && !link->visited &&
|
||||
priv->select_info && priv->select_info->links)
|
||||
{
|
||||
link->visited = TRUE;
|
||||
state = gtk_css_node_get_state (link->cssnode);
|
||||
|
Loading…
Reference in New Issue
Block a user