From 5493e051000bf4bbdde98882fe7a72b91b4e4613 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 30 Jun 2023 16:29:13 -0700 Subject: [PATCH] libsysprof-gtk: fix alpha check --- src/libsysprof-gtk/sysprof-column-layer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libsysprof-gtk/sysprof-column-layer.c b/src/libsysprof-gtk/sysprof-column-layer.c index 4d7b2f32..99d9f608 100644 --- a/src/libsysprof-gtk/sysprof-column-layer.c +++ b/src/libsysprof-gtk/sysprof-column-layer.c @@ -68,7 +68,7 @@ sysprof_column_layer_snapshot (GtkWidget *widget, _sysprof_xy_layer_get_xy (SYSPROF_XY_LAYER (self), &x_values, &y_values, &n_values); - if (width == 0 || height == 0 || n_values == 0 || self->color.alpha == 0) + if (width == 0 || height == 0 || n_values == 0) return; if (self->color_set) @@ -76,6 +76,9 @@ sysprof_column_layer_snapshot (GtkWidget *widget, else color = _sysprof_chart_layer_get_accent_bg_color (); + if (color->alpha == .0) + return; + gtk_snapshot_save (snapshot); if (!sysprof_xy_layer_get_flip_y (SYSPROF_XY_LAYER (self)))