[gtk] a11y: Don't re turn uninitialized memory



commit dabd09bc4251848a2410a64999a3d5380be7ff71
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 21 21:06:35 2020 -0400

    a11y: Don't re turn uninitialized memory
    
    For some reason, this was now showing up in the
    a11y tests as random image sizes in the about
    dialog test.

 gtk/a11y/gtkimageaccessible.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gtk/a11y/gtkimageaccessible.c b/gtk/a11y/gtkimageaccessible.c
index 99a27a658a..e299f3d4cc 100644
--- a/gtk/a11y/gtkimageaccessible.c
+++ b/gtk/a11y/gtkimageaccessible.c
@@ -309,6 +309,11 @@ gtk_image_accessible_get_image_size (AtkImage *image,
 
   if (gtk_image_get_storage_type (gtk_image) != GTK_IMAGE_EMPTY)
     gtk_image_get_image_size (gtk_image, width, height);
+  else
+    {
+      *height = 0;
+      *width = 0;
+    }
 }
 
 static gboolean


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