diff options
-rw-r--r-- | app/sql/connection.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/sql/connection.cc b/app/sql/connection.cc index dd3756e..8f74e6e 100644 --- a/app/sql/connection.cc +++ b/app/sql/connection.cc @@ -264,6 +264,11 @@ const char* Connection::GetErrorMessage() const { } bool Connection::OpenInternal(const std::string& file_name) { + if (db_) { + NOTREACHED() << "sql::Connection is already open."; + return false; + } + int err = sqlite3_open(file_name.c_str(), &db_); if (err != SQLITE_OK) { OnSqliteError(err, NULL); |