diff --git a/mysql.d b/mysql.d index 40c5759..4a5f1a0 100644 --- a/mysql.d +++ b/mysql.d @@ -229,7 +229,10 @@ class MySql : Database { } void close() { - mysql_close(mysql); + if(mysql) { + mysql_close(mysql); + mysql = null; + } } ~this() {