text: Don't crash when somebody drops NULL

This commit is contained in:
Benjamin Otte 2023-03-07 04:45:35 +01:00 committed by Matthias Clasen
parent 574380c744
commit 69238c1197

View File

@ -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