summaryrefslogtreecommitdiff
path: root/src/libical
diff options
context:
space:
mode:
Diffstat (limited to 'src/libical')
-rw-r--r--src/libical/icaltimezone.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libical/icaltimezone.c b/src/libical/icaltimezone.c
index 3e8ed883..0f68d475 100644
--- a/src/libical/icaltimezone.c
+++ b/src/libical/icaltimezone.c
@@ -982,11 +982,11 @@ int icaltimezone_get_utc_offset_of_utc_time(icaltimezone *zone,
if (zone->builtin_timezone)
zone = zone->builtin_timezone;
+ icaltimezone_changes_lock();
+
/* Make sure the changes array is expanded up to the given time. */
icaltimezone_ensure_coverage(zone, tt->year);
- icaltimezone_changes_lock();
-
if (!zone->changes || zone->changes->num_elements == 0) {
icaltimezone_changes_unlock();
return 0;