From 2a49d002a78ba893d1c3517297b1ff5a85e15cff Mon Sep 17 00:00:00 2001 From: Yessiest Date: Wed, 31 Aug 2022 16:51:03 +0400 Subject: [PATCH] Hotfix for desktop crash with missing MPC --- libs/builder.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/builder.lua b/libs/builder.lua index 879a73b..f319c6e 100644 --- a/libs/builder.lua +++ b/libs/builder.lua @@ -68,7 +68,10 @@ return function(description,opts) if v.draggable then list.buttons = buttons else - table.insert(list,inner_builder(v)) + local new_obj = inner_builder(v) + if new_obj then + table.insert(list,new_obj) + end end end return list @@ -98,7 +101,10 @@ return function(description,opts) if obj.draggable then list[k].buttons = buttons else - table.insert(list[k],inner_builder(obj)) + local new_obj = inner_builder(obj) + if new_obj then + table.insert(list[k],new_obj) + end end end end