From 371914af67384c9196062deeec1cbb9911fad89d Mon Sep 17 00:00:00 2001 From: Guldoman Date: Sat, 4 Sep 2021 00:32:01 +0200 Subject: [PATCH] Check if session file returned anything --- data/core/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/core/init.lua b/data/core/init.lua index 3bf10211..6b770fd6 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -17,7 +17,7 @@ local core = {} local function load_session() local ok, t = pcall(dofile, USERDIR .. "/session.lua") - if ok then + if ok and t then return t.recents, t.window, t.window_mode end return {} @@ -441,7 +441,7 @@ function core.init() elseif window_mode == "maximized" then system.set_window_mode("maximized") end - core.recent_projects = recent_projects + core.recent_projects = recent_projects or {} end local project_dir = core.recent_projects[1] or "."