Merge branch 'wip/chergert/fix-6308' into 'main'

texthistory: fix potential NULL dereference

Closes #6308

See merge request GNOME/gtk!6709
This commit is contained in:
Matthias Clasen 2024-01-05 16:43:19 +00:00
commit bc066de998

View File

@ -1103,7 +1103,8 @@ gtk_text_history_modified_changed (GtkTextHistory *self,
{
if (peek->kind == ACTION_KIND_BARRIER)
{
if (!(peek = peek->link.next->data))
if (peek->link.next == NULL ||
!(peek = peek->link.next->data))
return;
}