[gtk+/gtk-2-24] Bug 651224 - Potential NULL display ptr from quartz gtk_clipboard_wait_for_contents



commit 2c01e7e78d29011ad086613428933ac8c1ac32d6
Author: John Ralls <jralls ceridwen us>
Date:   Sat Sep 28 10:55:22 2013 -0700

    Bug 651224 - Potential NULL display ptr from quartz gtk_clipboard_wait_for_contents

 gtk/gtkclipboard-quartz.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkclipboard-quartz.c b/gtk/gtkclipboard-quartz.c
index e725d95..29c7b11 100644
--- a/gtk/gtkclipboard-quartz.c
+++ b/gtk/gtkclipboard-quartz.c
@@ -703,10 +703,12 @@ gtk_clipboard_wait_for_contents (GtkClipboard *clipboard,
       GdkAtom *atoms;
 
       length = [types count] * sizeof (GdkAtom);
-      
+
       selection_data = g_slice_new0 (GtkSelectionData);
       selection_data->selection = clipboard->selection;
       selection_data->target = target;
+      if (!selection_data->display)
+       selection_data->display = gdk_display_get_default ();
 
       atoms = g_malloc (length);
 


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