Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed where I defer.

  • Loading branch information...
commit 02020a852e44b9b215b9daddccb3ace6518279af 1 parent 1a6ce33
@phf authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 db.go
View
4 db.go
@@ -278,12 +278,12 @@ type PythonicCursor interface {
func ExecuteDirectly(connection Connection, query string, parameters ...) (results [][]interface{}, error os.Error) {
var s Statement;
s, error = connection.Prepare(query);
- if error != nil { return }
defer s.Close();
+ if error != nil { return }
var c Cursor;
c, error = connection.Execute(s, parameters);
- if error != nil { return }
+ if error != nil || c == nil { return }
defer c.Close();
results, error = c.FetchAll();
Please sign in to comment.
Something went wrong with that request. Please try again.