Fixed closing the database when it is not connected

This commit is contained in:
Timo Smit 2019-01-03 11:11:09 +01:00
parent da4fd9d235
commit 9e2359363b

View file

@ -51,7 +51,9 @@ end
events.handle("onGameInit", db.oninit)
function db.onshutdown(restartMap)
db.close(not restartMap)
if db.isConnected() then
db.close(not restartMap)
end
end
events.handle("onGameShutdown", db.onshutdown)