[gtk/gtk-3-24: 3/5] Check target list not null to prevent segfault.



commit c3deff17a6e9ef2e6e0415d1ecb6931af6d06fbd
Author: John Ralls <jralls ceridwen us>
Date:   Wed Dec 18 21:04:07 2019 -0800

    Check target list not null to prevent segfault.

 gtk/gtkdnd-quartz.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c
index b62b0625d1..789cdf3a08 100644
--- a/gtk/gtkdnd-quartz.c
+++ b/gtk/gtkdnd-quartz.c
@@ -1202,7 +1202,8 @@ gtk_drag_begin_internal (GtkWidget         *widget,
 
   window = [(id<GdkNSView>)[nswindow contentView] gdkWindow];
   g_return_val_if_fail (nsevent != NULL, NULL);
-
+  g_return_val_if_fail (target_list != NULL, NULL);
+  
   context = gdk_drag_begin (window, g_list_copy (target_list->list));
   g_return_val_if_fail (context != NULL, NULL);
 


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