summaryrefslogtreecommitdiff
path: root/osd.lua
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2026-01-08 20:24:59 -0800
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2026-01-08 20:24:59 -0800
commit99807db83c3ca0f29c5d031885df339d3d65fd82 (patch)
tree9b518dfe861860f2f3704a27264160a568a5b2c6 /osd.lua
parent7942572bd7c9b7e35090d3e73e067e4b2e748262 (diff)
downloadmpv-iptv-menu-99807db83c3ca0f29c5d031885df339d3d65fd82.tar.gz
mpv-iptv-menu-99807db83c3ca0f29c5d031885df339d3d65fd82.tar.xz
fix clearing of non-loaded image
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