aboutsummaryrefslogtreecommitdiff
path: root/sqlite_go18.go
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite_go18.go')
-rw-r--r--sqlite_go18.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/sqlite_go18.go b/sqlite_go18.go
index 4338dcc..b8c24ec 100644
--- a/sqlite_go18.go
+++ b/sqlite_go18.go
@@ -10,6 +10,7 @@ import (
"context"
"database/sql/driver"
"errors"
+ "unsafe"
)
// Ping implements driver.Pinger
@@ -17,7 +18,7 @@ func (c *conn) Ping(ctx context.Context) error {
c.Lock()
defer c.Unlock()
- if c.ppdb == 0 {
+ if uintptr(unsafe.Pointer(c.ppdb)) == 0 {
return errors.New("db is closed")
}