Skip to content
Browse files

Fix for crash in forced new_high_values.

  • Loading branch information...
1 parent d0b0a1e commit 7269b3f5bdd70f99f547b64f3e97cfc320a40ba1 @mworrell mworrell committed Jan 16, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/statz_percentile.erl
View
4 src/statz_percentile.erl
@@ -140,6 +140,10 @@ percentile(State) ->
new_high_values(#state{high_trending=false} = State) ->
State;
+new_high_values(#state{nums=[]} = State) ->
+ State;
+new_high_values(#state{new_nums=[]} = State) ->
+ State;
new_high_values(State) ->
{_,LastBelow} = lists:last(State#state.nums),
[{NewHighVal,NewHighBelow}|NewNumsBelow] = zip_below(LastBelow, lists:sort(State#state.new_nums), []),

0 comments on commit 7269b3f

Please sign in to comment.
Something went wrong with that request. Please try again.