Skip to content

Commit f948552

Browse files
b3nn0xerial
authored andcommitted
fixed exception during finalize when statement AND db is already closed (#342)
1 parent 23d3581 commit f948552

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/org/sqlite/core/CoreStatement.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@ protected boolean exec(String sql) throws SQLException {
116116
}
117117

118118
protected void internalClose() throws SQLException {
119-
if (conn.isClosed())
120-
throw DB.newSQLException(SQLITE_ERROR, "Connection is closed");
121-
122119
if (pointer == 0)
123120
return;
121+
if (conn.isClosed())
122+
throw DB.newSQLException(SQLITE_ERROR, "Connection is closed");
124123

125124
rs.close();
126125

0 commit comments

Comments
 (0)