Only try to close our connection object if it has successfully been

created in the first place.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@102 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2001-03-19 22:58:06 +00:00
parent 69f51a8559
commit a6854ab613
@@ -100,7 +100,9 @@ public class Session {
((PreparedStatement)items.nextElement()).close(); ((PreparedStatement)items.nextElement()).close();
} }
preparedStmtHash.clear(); preparedStmtHash.clear();
connection.close(); if (connection != null) {
connection.close();
}
// } // }
// catch (SQLException ex) { handleSQLException(ex); } // catch (SQLException ex) { handleSQLException(ex); }
} }