From 46751896d3321d7b4576da0a23bb87565b723496 Mon Sep 17 00:00:00 2001 From: Azumgi <4zumgi@gmail.com> Date: Fri, 25 Jan 2019 02:47:05 +0300 Subject: [PATCH] [Custom Views] Pass view as self when calling 'destroy' --- vmf/scripts/mods/vmf/modules/gui/custom_views.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmf/scripts/mods/vmf/modules/gui/custom_views.lua b/vmf/scripts/mods/vmf/modules/gui/custom_views.lua index e504c10..b23ec3e 100644 --- a/vmf/scripts/mods/vmf/modules/gui/custom_views.lua +++ b/vmf/scripts/mods/vmf/modules/gui/custom_views.lua @@ -127,7 +127,7 @@ local function remove_injected_views(on_reload) local view = _ingame_ui.views[view_name] if view then if type(view.destroy) == "function" then - vmf.safe_call_nr(view_data.mod, {ERRORS.PREFIX["view_destroying"], view_name}, view.destroy) + vmf.safe_call_nr(view_data.mod, {ERRORS.PREFIX["view_destroying"], view_name}, view.destroy, view) end _ingame_ui.views[view_name] = nil end