Merge pull request #354 from Quentin-M/patch-2

Fix NPE in SQL initialization
This commit is contained in:
Barak Michener 2015-12-06 21:28:13 -05:00
commit 14a5ccce96

View file

@ -64,10 +64,10 @@ func connectSQLTables(addr string, _ graph.Options) (*sql.DB, error) {
func createSQLTables(addr string, options graph.Options) error {
conn, err := connectSQLTables(addr, options)
defer conn.Close()
if err != nil {
return err
}
defer conn.Close()
tx, err := conn.Begin()
if err != nil {
glog.Errorf("Couldn't begin creation transaction: %s", err)