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
4705b6b3a5
commit
041530ee72
|
@ -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