diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 3ba3d0d3d12..48c44ea27cc 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -8538,8 +8538,9 @@ update_dprintf_command_list (struct breakpoint *b)
   const char *dprintf_args = b->extra_string.get ();
   gdb::unique_xmalloc_ptr<char> printf_line = nullptr;
 
-  if (!dprintf_args)
-    return;
+  /* Trying to create a dprintf breakpoint without a format and args
+     string should be detected at creation time.  */
+  gdb_assert (dprintf_args != nullptr);
 
   dprintf_args = skip_spaces (dprintf_args);
 
