From a125c09106d44dcf01de42d30aa3ef67713f5f25 Mon Sep 17 00:00:00 2001 From: Oshisaure Date: Mon, 12 Oct 2020 21:21:10 +0100 Subject: [PATCH] Fixed crash on loading the game with no save --- main.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/main.lua b/main.lua index 8879507..33d1f4d 100644 --- a/main.lua +++ b/main.lua @@ -15,16 +15,17 @@ function love.load() love.window.setMode(love.graphics.getWidth(), love.graphics.getHeight(), {resizable = true}); + if not config.gamesettings then config.gamesettings = {} end + for _, option in ipairs(GameConfigScene.options) do + if not config.gamesettings[option[1]] then + config.gamesettings[option[1]] = 1 + end + end + if not config.input then config.input = {} scene = InputConfigScene() else - if not config.gamesettings then config.gamesettings = {} end - for _, option in ipairs(GameConfigScene.options) do - if not config.gamesettings[option[1]] then - config.gamesettings[option[1]] = 1 - end - end if config.current_mode then current_mode = config.current_mode end if config.current_ruleset then current_ruleset = config.current_ruleset end scene = TitleScene()