summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-util.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/wee-util.c b/src/core/wee-util.c
index 40a1b50f3..cf3d9fe38 100644
--- a/src/core/wee-util.c
+++ b/src/core/wee-util.c
@@ -117,8 +117,15 @@ util_get_time_string (const time_t *date)
static char text_time[128];
local_time = localtime (date);
- strftime (text_time, sizeof (text_time),
- CONFIG_STRING(config_look_time_format), local_time);
+ if (local_time)
+ {
+ strftime (text_time, sizeof (text_time),
+ CONFIG_STRING(config_look_time_format), local_time);
+ }
+ else
+ {
+ text_time[0] = '\0';
+ }
return text_time;
}