[gtk/evince_crash_popover_motion] fix crash in gtk_synthesize_crossing_events()
- From: Nelson Ben <nbenitez src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk/evince_crash_popover_motion] fix crash in gtk_synthesize_crossing_events()
- Date: Sun, 18 Sep 2022 03:11:30 +0000 (UTC)
commit 1983dfb540f5ec06baf1556634f7b534292d4818
Author: Nelson Benítez León <nbenitezl gmail com>
Date:   Sat Sep 17 23:00:30 2022 -0400
    fix crash in gtk_synthesize_crossing_events()
    
    prevent accessing on a NULL variable.
    
    Fixes #5190
 gtk/gtkmain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index ed161d29b7..52f2b33519 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1205,7 +1205,7 @@ gtk_synthesize_crossing_events (GtkRoot         *toplevel,
           GtkWidget *w;
 
           crossing.old_descendent = NULL;
-          for (w = old_target; w != ancestor; w = _gtk_widget_get_parent (w))
+          for (w = old_target; w && w != ancestor; w = _gtk_widget_get_parent (w))
             crossing.old_descendent = w;
 
           seen_ancestor = TRUE;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]