Check if session file returned anything

This commit is contained in:
Guldoman 2021-09-04 00:32:01 +02:00
parent a134c8ea99
commit 371914af67
No known key found for this signature in database
GPG Key ID: C08A498EC7F1AFDD
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ local core = {}
local function load_session() local function load_session()
local ok, t = pcall(dofile, USERDIR .. "/session.lua") local ok, t = pcall(dofile, USERDIR .. "/session.lua")
if ok then if ok and t then
return t.recents, t.window, t.window_mode return t.recents, t.window, t.window_mode
end end
return {} return {}
@ -441,7 +441,7 @@ function core.init()
elseif window_mode == "maximized" then elseif window_mode == "maximized" then
system.set_window_mode("maximized") system.set_window_mode("maximized")
end end
core.recent_projects = recent_projects core.recent_projects = recent_projects or {}
end end
local project_dir = core.recent_projects[1] or "." local project_dir = core.recent_projects[1] or "."