summaryrefslogtreecommitdiff
path: root/xc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xc.lua')
-rw-r--r--xc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xc.lua b/xc.lua
index 723f9cb..e1f37d7 100644
--- a/xc.lua
+++ b/xc.lua
@@ -31,7 +31,7 @@ function mt:get(path, params)
capture_stdout = true,
playback_only = false,
})
- if res.status == 0 then
+ if res and res.status == 0 then
return res.stdout
end
end
@@ -103,7 +103,7 @@ json.dump(
capture_stdout = true,
playback_only = false,
})
- if res.status == 0 then
+ if res and res.status == 0 then
return mp_utils.parse_json(res.stdout)
end
end