[Custom View] Fix loading screen reloading crash

This commit is contained in:
Azumgi 2019-01-04 14:15:19 +03:00
parent 1f950de22e
commit 845ba03527

View file

@ -114,7 +114,7 @@ end
local function remove_injected_views(on_reload)
-- These elements should be removed only on_reload, because, otherwise, they will be deleted automatically.
if on_reload and _ingame_ui then
if on_reload then
-- If some custom view is active, close it.
if _views_data[_ingame_ui.current_view] then
_ingame_ui:handle_transition("exit_menu")
@ -350,7 +350,9 @@ end)
-- #####################################################################################################################
function vmf.remove_custom_views()
remove_injected_views(true)
if _ingame_ui then
remove_injected_views(true)
end
end