From 4f73d22da6e8be2a53dae12eb6827bf2e8caeab9 Mon Sep 17 00:00:00 2001 From: Simpy Date: Wed, 13 Nov 2024 08:31:53 -0500 Subject: [PATCH] check for existence --- ElvUI/Core/General/Commands.lua | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ElvUI/Core/General/Commands.lua b/ElvUI/Core/General/Commands.lua index 8775d1c639..b2ebcced27 100644 --- a/ElvUI/Core/General/Commands.lua +++ b/ElvUI/Core/General/Commands.lua @@ -135,7 +135,10 @@ do local switch = lower(msg) if switch ~= '' then if switch == 'e' then - E:SortProfilerData('E', E.profiler.data[E]) + local data = E.profiler.data[E] + if data then + E:SortProfilerData('E', data) + end else for key, module in next, E.modules do local data = switch == lower(key) and E.profiler.data[module] @@ -147,12 +150,15 @@ do end end else - E:SortProfilerData('E', E.profiler.data[E]) + local data = E.profiler.data[E] + if data then + E:SortProfilerData('E', data) + end for key, module in next, E.modules do - local data = E.profiler.data[module] - if data then - E:SortProfilerData(key, data) + local info = E.profiler.data[module] + if info then + E:SortProfilerData(key, info) end end end