[gtk+] css: Avoid a crash while parsing radial gradients



commit aceba7484faf4932442d92d0b2dd0f0466e0afed
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 7 14:44:29 2016 -0500

    css: Avoid a crash while parsing radial gradients
    
    has_size does not imply that sizes[0] is != NULL.

 gtk/gtkcssimageradial.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssimageradial.c b/gtk/gtkcssimageradial.c
index 4ae4344..1d4b99b 100644
--- a/gtk/gtkcssimageradial.c
+++ b/gtk/gtkcssimageradial.c
@@ -346,7 +346,7 @@ gtk_css_image_radial_parse (GtkCssImage  *image,
 
   if (has_size && !radial->circle)
     {
-      if (!radial->sizes[1])
+      if (radial->sizes[0] && !radial->sizes[1])
         radial->sizes[1] = _gtk_css_value_ref (radial->sizes[0]);
     }
 


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