summaryrefslogtreecommitdiff
path: root/osd.lua
diff options
context:
space:
mode:
Diffstat (limited to 'osd.lua')
-rw-r--r--osd.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/osd.lua b/osd.lua
index a2c2684..a61f12e 100644
--- a/osd.lua
+++ b/osd.lua
@@ -221,7 +221,10 @@ function mt:clear_img(purge)
return
end
- mp.command_native({name = 'overlay-remove', id = self.img.cmd.id})
+ if self.img.cmd then
+ mp.command_native({name = 'overlay-remove', id = self.img.cmd.id})
+ end
+
if purge then
self.img = nil
end