diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index f9ad68a..8533207 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -7071,7 +7071,10 @@ gtk_entry_set_text (GtkEntry    *entry,
   GtkEntryCompletion *completion;
 
   g_return_if_fail (GTK_IS_ENTRY (entry));
-  g_return_if_fail (text != NULL);
+
+  /* Treat NULL strings and empty strings identically. */
+  if (text == NULL)
+    text = "";
 
   /* Actually setting the text will affect the cursor and selection;
    * if the contents don't actually change, this will look odd to the user.
