From 385fe97861843339db8d2ad2b627088a3934b5ce Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Tue, 31 May 2016 11:27:39 -0700 Subject: [PATCH] Make Realm::is_closed() work on read-only instances --- src/shared_realm.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();