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…
Reference in New Issue