handle nil return value

This commit is contained in:
Ren Tatsumoto 2024-05-26 21:34:08 +03:00
parent 0e3f2245b0
commit 4fd40d66c9

View file

@ -159,7 +159,7 @@ this.create_clip = function(clip_type, on_complete)
local output_dir_path = utils.split_path(output_file_path)
local location_info = utils.file_info(output_dir_path)
if not location_info.is_dir then
if not location_info or not location_info.is_dir then
h.notify(string.format("Error: location %s doesn't exist.", output_dir_path), "error", 5)
return
end