summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2018-03-20 21:54:22 -0500
committer cracyc <cracyc@users.noreply.github.com>2018-03-20 21:54:22 -0500
commit31be84ea40267792f3b38ff52dfd5f75b0128a94 (patch)
tree76ec8e6368f4f70bf590394e1bc9eb563dde2d11
parent6cbf5c674bb3ee20ab89df1f839de291d02aa92b (diff)
plugins/data: give up if the database can't be created (nw)
-rw-r--r--plugins/data/database.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/data/database.lua b/plugins/data/database.lua
index aff74c9bc87..82a389c3237 100644
--- a/plugins/data/database.lua
+++ b/plugins/data/database.lua
@@ -14,6 +14,10 @@ do
if not db then
lfs.mkdir(dbpath)
db = sql.open(dbpath .. "/history.db")
+ if not db then
+ emu.print_error("Unable to create history.db\n")
+ return nil
+ end
check_db("opening database")
end
end