diff --git a/glib/gdatetime.c b/glib/gdatetime.c index 5211c144e..11e10e570 100644 --- a/glib/gdatetime.c +++ b/glib/gdatetime.c @@ -2216,6 +2216,9 @@ format_ampm (GDateTime *datetime, ampm = GET_AMPM (datetime); + if (!ampm || ampm[0] == '\0') + ampm = get_fallback_ampm (g_date_time_get_hour (datetime)); + #if defined (HAVE_LANGINFO_TIME) if (!locale_is_utf8) {