Check that db.prepare worked before using the returned statement
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user