From 69238c119722fe1b5e1114edf3c21b2ed913feee Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 7 Mar 2023 04:45:35 +0100 Subject: [PATCH] text: Don't crash when somebody drops NULL --- gtk/gtktext.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtktext.c b/gtk/gtktext.c index 9d11aa2d2a..53335ced05 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -6354,6 +6354,9 @@ gtk_text_drag_drop (GtkDropTarget *dest, drop_position = gtk_text_find_position (self, x + priv->scroll_offset); str = g_value_get_string (value); + if (str == NULL) + str = ""; + if (priv->truncate_multiline) length = truncate_multiline (str); else