mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 16:30:15 +00:00
Merge branch 'editable-check-text' into 'main'
Add additional check for NULL text in GtkEditable See merge request GNOME/gtk!6174
This commit is contained in:
commit
7e9f2e2311
@ -486,6 +486,9 @@ gtk_editable_insert_text (GtkEditable *editable,
|
||||
g_return_if_fail (length >= -1);
|
||||
g_return_if_fail (position != NULL);
|
||||
|
||||
if (text == NULL)
|
||||
text = "";
|
||||
|
||||
if (length < 0)
|
||||
length = strlen (text);
|
||||
|
||||
@ -600,6 +603,7 @@ gtk_editable_set_text (GtkEditable *editable,
|
||||
int pos;
|
||||
|
||||
g_return_if_fail (GTK_IS_EDITABLE (editable));
|
||||
g_return_if_fail (text != NULL);
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (editable));
|
||||
gtk_editable_delete_text (editable, 0, -1);
|
||||
|
Loading…
Reference in New Issue
Block a user