diff options
author | pascal <pascal@localhost> | 2012-05-12 15:19:25 +0000 |
---|---|---|
committer | pascal <pascal@localhost> | 2012-05-12 15:19:25 +0000 |
commit | 78d983a963516dc26db994bba298e600d70be015 (patch) | |
tree | 44b1c9ac28f3d5d4c53bf08d765609e963024347 | |
parent | 466988126d91f2497b49599da3950d60adff4af2 (diff) |
From Akos Lukovics:
Fix div-by-zero error in the moving average filter of IO graph
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6236
svn path=/trunk/; revision=42598
-rw-r--r-- | ui/gtk/io_stat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/gtk/io_stat.c b/ui/gtk/io_stat.c index 91420ca782..7a885838be 100644 --- a/ui/gtk/io_stat.c +++ b/ui/gtk/io_stat.c @@ -1145,7 +1145,9 @@ io_stat_draw(io_stat_t *io) mavg_right--; } } - val = mavg_cumulated / mavg_in_average_count; + if (mavg_in_average_count > 0) { + val = mavg_cumulated / mavg_in_average_count; + } } if (val>max_y) { |