mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-17 09:06:26 +00:00
Add validate_read() check to Results::set_live()
If the Results is detached, then this can cause a crash.
This commit is contained in:
parent
cf5112467c
commit
850e3a4090
@ -82,6 +82,8 @@ void Results::validate_write() const
|
||||
|
||||
void Results::set_live(bool live)
|
||||
{
|
||||
validate_read();
|
||||
|
||||
if (!live && m_mode == Mode::Table) {
|
||||
m_query = m_table->where();
|
||||
m_mode = Mode::Query;
|
||||
|
Loading…
x
Reference in New Issue
Block a user