fix(profiler): handle missing _counts in reset() during init

This commit is contained in:
Kelvin Velasquez 2025-12-23 14:51:42 -06:00
parent 8c52a114c1
commit d3271af5d5
1 changed files with 4 additions and 1 deletions

View File

@ -84,7 +84,10 @@ class PluginModel(GlancesPluginModel):
def reset(self):
"""Reset stats."""
self.stats = []
self._counts.clear()
if hasattr(self, '_counts'):
self._counts.clear()
else:
self._counts = Counter()
def update(self):
"""Update stats."""