From 4fd40d66c95905ed828ca77b7120732014b93ac5 Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Sun, 26 May 2024 21:34:08 +0300 Subject: [PATCH] handle nil return value --- encoder.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoder.lua b/encoder.lua index 05753fa..3ed6950 100644 --- a/encoder.lua +++ b/encoder.lua @@ -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