1
0
mirror of https://github.com/specht/champ.git synced 2024-06-02 04:41:33 +00:00

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

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