From ba04780a1b548011792a3884f921ca035c270de3 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Tue, 31 Dec 2024 10:08:18 +0100 Subject: [PATCH] select.lua: fix select-edition crash on non-MKVs In files other than MKVs edition-list is an empty table, not nil. It is current-edition that is nil. However nil still needs to be checked to not crash with mpv --idle. --- player/lua/select.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/lua/select.lua b/player/lua/select.lua index 0e469fe94665c..27f4a35d79a94 100644 --- a/player/lua/select.lua +++ b/player/lua/select.lua @@ -226,7 +226,7 @@ end) mp.add_key_binding(nil, "select-edition", function () local edition_list = mp.get_property_native("edition-list") - if edition_list == nil or #edition_list == 1 then + if edition_list == nil or #edition_list < 2 then show_error("No available editions.") return end