diff --git a/src/object-store/src/shared_realm.cpp b/src/object-store/src/shared_realm.cpp index 2624f764..b02c954d 100644 --- a/src/object-store/src/shared_realm.cpp +++ b/src/object-store/src/shared_realm.cpp @@ -184,7 +184,8 @@ Group *Realm::read_group() SharedRealm Realm::get_shared_realm(Config config) { - return RealmCoordinator::get_coordinator(config.path)->get_realm(std::move(config)); + auto coordinator = RealmCoordinator::get_coordinator(config.path); + return coordinator->get_realm(std::move(config)); } void Realm::update_schema(std::unique_ptr schema, uint64_t version)