diff --git a/src/libsysprof-gtk/sysprof-column-layer.c b/src/libsysprof-gtk/sysprof-column-layer.c index 99d9f608..b13955d2 100644 --- a/src/libsysprof-gtk/sysprof-column-layer.c +++ b/src/libsysprof-gtk/sysprof-column-layer.c @@ -91,14 +91,18 @@ sysprof_column_layer_snapshot (GtkWidget *widget, for (guint i = 0; i < n_values; i++) { - int line_height = ceilf (y_values[i] * height); + if (x_values[i] < .0) + continue; + + if (x_values[i] > 1.) + break; gtk_snapshot_append_color (snapshot, color, &GRAPHENE_RECT_INIT (x_values[i] * width, 0, 1, - line_height)); + ceilf (y_values[i] * height))); } gtk_snapshot_restore (snapshot);