Commit cdace807 authored by louiz’'s avatar louiz’

Check that db.prepare worked before using the returned statement

parent faa33c1a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment