[gtk/wip/baedert/for-master: 16/27] csstransformvalue: Make no-transform case explicit



commit 9cc5d62f336e1f90b8f2d39212b1283cfcf50a76
Author: Timm Bäder <mail baedert org>
Date:   Sat Jun 6 15:13:23 2020 +0200

    csstransformvalue: Make no-transform case explicit

 gtk/gtkcsstransformvalue.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkcsstransformvalue.c b/gtk/gtkcsstransformvalue.c
index 4f6f81bff4..f50873328a 100644
--- a/gtk/gtkcsstransformvalue.c
+++ b/gtk/gtkcsstransformvalue.c
@@ -1231,7 +1231,10 @@ GskTransform *
 gtk_css_transform_value_get_transform (const GtkCssValue *transform)
 {
   g_return_val_if_fail (transform->class == &GTK_CSS_VALUE_TRANSFORM, FALSE);
-  
+
+  if (transform->n_transforms == 0)
+    return NULL;
+
   return gtk_css_transform_value_compute_transform (transform);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]