[gtk/fix_crash_needs_widget_path] Fix crash inside widget_needs_widget_path()




commit 45519b47cb5eb4acd4377d113fd248f9b8a73e88
Author: Nelson Benítez León <nbenitezl gmail com>
Date:   Sat Jul 30 15:14:24 2022 -0400

    Fix crash inside widget_needs_widget_path()
    
    Crash found at least in Nautilus and Gnome-calendar:
    https://bugzilla.redhat.com/buglist.cgi?quicksearch=widget_needs_widget_path
    
    Fixes #2457

 gtk/gtkcsswidgetnode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkcsswidgetnode.c b/gtk/gtkcsswidgetnode.c
index 2d65b266db..d42011b20a 100644
--- a/gtk/gtkcsswidgetnode.c
+++ b/gtk/gtkcsswidgetnode.c
@@ -165,7 +165,7 @@ widget_needs_widget_path (GtkWidget *widget)
     }
 
   parent = _gtk_widget_get_parent (widget);
-  if (parent == NULL)
+  if (parent == NULL || !GTK_IS_CONTAINER (parent))
     return FALSE;
 
   parent_func = GTK_CONTAINER_GET_CLASS (GTK_CONTAINER (parent))->get_path_for_child;


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