don't crash on subroutine cycles watches for labels that never get

called via JSR
This commit is contained in:
Michael Specht 2018-02-16 21:54:36 +01:00
parent 374b714cfb
commit a74de30889
1 changed files with 1 additions and 1 deletions

View File

@ -584,7 +584,7 @@ class Champ
end
end
if (!@watch_values.include?(index)) && @cycles_per_function.include?(watch[:pc])
if (!@watch_values.include?(index)) && @cycles_per_function.include?(watch[:pc]) && (!@cycles_per_function[watch[:pc]].empty?)
max_cycle_count_for_function = @cycles_per_function[watch[:pc]].map do |x|
x[:call_cycles]
end.max