Skip to content

Commit 6a370c2

Browse files
authored
Merge pull request #124 from JuliaDB/tk/doublefinalize
see if avoiding double-finalizing fixes win32 access violation
2 parents cb3a621 + 015b8fc commit 6a370c2

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Contributions are very welcome, as are feature requests and suggestions. Please
4040
[travis-img]: https://travis-ci.org/JuliaDB/SQLite.jl.svg?branch=master
4141
[travis-url]: https://travis-ci.org/JuliaDB/SQLite.jl
4242

43-
[appveyor-img]: https://ci.appveyor.com/api/projects/status/h227adt6ovd1u3sx/branch/master?svg=true
44-
[appveyor-url]: https://ci.appveyor.com/project/JuliaDB/documenter-jl/branch/master
43+
[appveyor-img]: https://ci.appveyor.com/api/projects/status/github/JuliaDB/SQLite.jl?branch=master&svg=true
44+
[appveyor-url]: https://ci.appveyor.com/project/quinnj/sqlite-jl/branch/master
4545

4646
[codecov-img]: https://codecov.io/gh/JuliaDB/SQLite.jl/branch/master/graph/badge.svg
4747
[codecov-url]: https://codecov.io/gh/JuliaDB/SQLite.jl

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ build_script:
3434
- IF EXIST .git\shallow (git fetch --unshallow)
3535
- C:\projects\julia\bin\julia -e "versioninfo();
3636
Pkg.clone(pwd(), \"SQLite\"); Pkg.build(\"SQLite\")"
37+
- where *sqlite3*
3738

3839
test_script:
3940
- C:\projects\julia\bin\julia -e "Pkg.test(\"SQLite\")"

src/SQLite.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ end
5454
DB() = DB(":memory:")
5555

5656
function _close(db::DB)
57-
sqlite3_close_v2(db.handle)
57+
db.handle == C_NULL || sqlite3_close_v2(db.handle)
5858
db.handle = C_NULL
5959
return
6060
end
@@ -78,7 +78,7 @@ type Stmt
7878
end
7979

8080
function _close(stmt::Stmt)
81-
sqlite3_finalize(stmt.handle)
81+
stmt.handle == C_NULL || sqlite3_finalize(stmt.handle)
8282
stmt.handle = C_NULL
8383
return
8484
end

0 commit comments

Comments
 (0)