From 850e3a4090436676b09ba3f6d669668d4aadb2bd Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Thu, 28 Apr 2016 09:39:53 -0700 Subject: [PATCH] Add validate_read() check to Results::set_live() If the Results is detached, then this can cause a crash. --- src/results.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/results.cpp b/src/results.cpp index bfdd8e87..b600af41 100644 --- a/src/results.cpp +++ b/src/results.cpp @@ -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;