diff --git a/src/core/internal/persistent_string_cache_impl.cpp b/src/core/internal/persistent_string_cache_impl.cpp
index be49641..6a63fd9 100644
--- a/src/core/internal/persistent_string_cache_impl.cpp
+++ b/src/core/internal/persistent_string_cache_impl.cpp
@@ -1271,7 +1271,7 @@ void PersistentStringCacheImpl::check_version()
     throw_if_error(s, "cannot read schema version");
     assert(!s.IsNotFound());
 
-    int old_version;
+    int old_version = 0;
     try
     {
         old_version = stoi(val);
