diff --git a/src/shared_realm.hpp b/src/shared_realm.hpp index e7c3c0f2..8b70d3b1 100644 --- a/src/shared_realm.hpp +++ b/src/shared_realm.hpp @@ -132,7 +132,7 @@ namespace realm { // Realm after closing it will produce undefined behavior. void close(); - bool is_closed() { return m_shared_group == nullptr; } + bool is_closed() { return !m_read_only_group && !m_shared_group; } ~Realm();