Check if the connection is not null or already closed
This commit is contained in:
@@ -350,7 +350,8 @@ public class SQLite implements DataSource {
|
||||
@Override
|
||||
public synchronized void close() {
|
||||
try {
|
||||
con.close();
|
||||
if (con != null && !con.isClosed())
|
||||
con.close();
|
||||
} catch (SQLException ex) {
|
||||
logSqlException(ex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user