[gtk] gsktransform: Make next == NULL case explicit



commit a974c83423715cf6752194b0ab4f8a50a0bb9bb8
Author: Timm Bäder <mail baedert org>
Date:   Sat Jun 6 09:05:49 2020 +0200

    gsktransform: Make next == NULL case explicit
    
    This is handled with the is_identity() check as well but this way it's
    much more obvious what's happening

 gsk/gsktransform.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c
index 2d94d7e7a5..79f230c0a1 100644
--- a/gsk/gsktransform.c
+++ b/gsk/gsktransform.c
@@ -1622,6 +1622,9 @@ gsk_transform_transform (GskTransform *next,
   if (other == NULL)
     return next;
 
+  if (next == NULL)
+    return gsk_transform_ref (other);
+
   if (gsk_transform_is_identity (next))
     {
       /* ref before unref to avoid catastrophe when other == next */


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