This commit is contained in:
Ari Lazier 2016-05-19 12:22:07 -07:00
parent 592a35a69e
commit fc794bbf31
1 changed files with 2 additions and 2 deletions

View File

@ -92,6 +92,8 @@ Results::~Results()
bool Results::is_valid() const bool Results::is_valid() const
{ {
if (m_realm)
m_realm->verify_thread();
if (m_table && !m_table->is_attached()) if (m_table && !m_table->is_attached())
return false; return false;
if (m_mode == Mode::TableView && (!m_table_view.is_attached() || m_table_view.depends_on_deleted_object())) if (m_mode == Mode::TableView && (!m_table_view.is_attached() || m_table_view.depends_on_deleted_object()))
@ -104,8 +106,6 @@ bool Results::is_valid() const
void Results::validate_read() const void Results::validate_read() const
{ {
if (m_realm)
m_realm->verify_thread();
if (!is_valid()) if (!is_valid())
throw InvalidatedException(); throw InvalidatedException();
} }