diff options
-rw-r--r-- | plugins/data/database.lua | 4 |
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 |