summaryrefslogtreecommitdiff
path: root/src/database/select_query.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/select_query.hpp')
-rw-r--r--src/database/select_query.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/database/select_query.hpp b/src/database/select_query.hpp
index 5a17f38..743a011 100644
--- a/src/database/select_query.hpp
+++ b/src/database/select_query.hpp
@@ -115,6 +115,8 @@ struct SelectQuery: public Query
#endif
auto statement = db.prepare(this->body);
+ if (!statement)
+ return rows;
statement->bind(std::move(this->params));
while (statement->step() == StepResult::Row)