diff options
author | glotov@chromium.org <glotov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-17 13:11:17 +0000 |
---|---|---|
committer | glotov@chromium.org <glotov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-17 13:11:17 +0000 |
commit | b4c363bad50f8f5733c7b10c232fb164ecc708b5 (patch) | |
tree | 23c432aab1db5188f309d057c4d5cebb7f2116fb /sql/statement.cc | |
parent | 269543e261505b409a45903151411fb51a7a1813 (diff) | |
download | chromium_src-b4c363bad50f8f5733c7b10c232fb164ecc708b5.zip chromium_src-b4c363bad50f8f5733c7b10c232fb164ecc708b5.tar.gz chromium_src-b4c363bad50f8f5733c7b10c232fb164ecc708b5.tar.bz2 |
Fixing null pointer dereference.
BUG=chromium:158178
TEST=units,make sure such SEGV doesnt happen on x86-generic-bot (where it pops periodically now)
Review URL: https://chromiumcodereview.appspot.com/11886065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql/statement.cc')
-rw-r--r-- | sql/statement.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/statement.cc b/sql/statement.cc index 84dfd2e..cd55bf7 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; } |