Fix NPE in SQL initialization
Happens when the database could not be opened. Introduced by e849da9
This commit is contained in:
parent
0a6e5fad1a
commit
582c4e1ca4
1 changed files with 1 additions and 1 deletions
|
|
@ -64,10 +64,10 @@ func connectSQLTables(addr string, _ graph.Options) (*sql.DB, error) {
|
||||||
|
|
||||||
func createSQLTables(addr string, options graph.Options) error {
|
func createSQLTables(addr string, options graph.Options) error {
|
||||||
conn, err := connectSQLTables(addr, options)
|
conn, err := connectSQLTables(addr, options)
|
||||||
defer conn.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer conn.Close()
|
||||||
tx, err := conn.Begin()
|
tx, err := conn.Begin()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Couldn't begin creation transaction: %s", err)
|
glog.Errorf("Couldn't begin creation transaction: %s", err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue