diff options
Diffstat (limited to 'plugins/clock/clock-time.c')
-rw-r--r-- | plugins/clock/clock-time.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/clock/clock-time.c b/plugins/clock/clock-time.c index 8d2d2087..cfb5920b 100644 --- a/plugins/clock/clock-time.c +++ b/plugins/clock/clock-time.c @@ -223,7 +223,12 @@ clock_time_strdup_strftime (ClockTime *time, g_date_time_unref (date_time); - return str; + /* Explicitely return NULL if a format specifier fails */ + if (!str || + g_strcmp0 (str, "") == 0) + return NULL; + else + return str; } |