aboutsummaryrefslogtreecommitdiffstats
path: root/stdtime
diff options
context:
space:
mode:
Diffstat (limited to 'stdtime')
-rwxr-xr-xstdtime/localtime.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/stdtime/localtime.c b/stdtime/localtime.c
index 18a1b597c..276eb9f97 100755
--- a/stdtime/localtime.c
+++ b/stdtime/localtime.c
@@ -981,11 +981,14 @@ const char * const zone;
sp = lclptr;
/* Find the right zone record */
- while (sp != NULL) {
- if (!strcmp(sp->name,zone))
- break;
- sp = sp->next;
- }
+ if (zone == NULL)
+ sp = NULL;
+ else
+ while (sp != NULL) {
+ if (!strcmp(sp->name,zone))
+ break;
+ sp = sp->next;
+ }
if (sp == NULL) {
ast_tzsetwall();