Commit: 8c7c7c39a92c0ba895d19bb3e17303ae2a9133d2
Parent: 74c5b8b833609bf8be1a44e0e9bd08dbcdfc68eb
Author: Ren Tatsumoto
Date: Fri, 11 Sep 2020 11:03:04 +0300
if got null
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -409,6 +409,10 @@ ankiconnect.parse_result = function(curl_output)
-- there are two values that we actually care about: result and error
-- but we need to crawl inside to get them.
+ if curl_output == nil then
+ return nil, "Failed to format json"
+ end
+
if curl_output.status ~= 0 then
return nil, "Ankiconnect isn't running"
end