From Akos Lukovics:
authorpascal <pascal@localhost>
Sat, 12 May 2012 15:19:25 +0000 (15:19 -0000)
committerpascal <pascal@localhost>
Sat, 12 May 2012 15:19:25 +0000 (15:19 -0000)
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

ui/gtk/io_stat.c

index 91420ca782b76798a2f84f2e43eb1c7af389a9e6..7a885838be02082dec82249508eee4345f64c0db 100644 (file)
@@ -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) {