Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Unified Diff: sql/statement.cc

Issue 11886065: Fixing null pointer dereference. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sql/connection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/statement.cc
diff --git a/sql/statement.cc b/sql/statement.cc
index 84dfd2eb9aa850407cff6e84c83e49cce646d865..cd55bf710ff94ca4d3ea1def37f3ebed41815a3a 100644
--- a/sql/statement.cc
+++ b/sql/statement.cc
@@ -306,7 +306,7 @@ bool Statement::CheckOk(int err) const {
int Statement::CheckError(int err) {
// Please don't add DCHECKs here, OnSqliteError() already has them.
succeeded_ = (err == SQLITE_OK || err == SQLITE_ROW || err == SQLITE_DONE);
- if (!succeeded_ && is_valid())
+ if (!succeeded_ && is_valid() && ref_->connection())
return ref_->connection()->OnSqliteError(err, this);
return err;
}
« no previous file with comments | « sql/connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698