diff options
author | John Ralls <jralls@ceridwen.us> | 2011-07-03 16:40:03 -0700 |
---|---|---|
committer | Kristian Rietveld <kris@gtk.org> | 2011-07-14 14:17:51 +0200 |
commit | 86794ce0084ba81fc31d1a0f313498e969e3a3f3 (patch) | |
tree | fbf11e23306438485a4f7ae0ab265346e861172a /gtk/gtkquartz.c | |
parent | cbc593bc229fd09aff0c776449133fdaf187f327 (diff) | |
download | gtk+-86794ce0084ba81fc31d1a0f313498e969e3a3f3.tar.gz |
Bug 653450 - gtkfilechooser crashes when added favorite
Ensure that display is set during drag-and-drop, and that string lists'
memory is zeroed after allocation to prevent g_strfreev() from
over-running.
Diffstat (limited to 'gtk/gtkquartz.c')
-rw-r--r-- | gtk/gtkquartz.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkquartz.c b/gtk/gtkquartz.c index d691f7f254..b9ea2ec1ff 100644 --- a/gtk/gtkquartz.c +++ b/gtk/gtkquartz.c @@ -160,7 +160,8 @@ _gtk_quartz_get_selection_data_from_pasteboard (NSPasteboard *pasteboard, selection_data = g_slice_new0 (GtkSelectionData); selection_data->selection = selection; selection_data->target = target; - + if (!selection_data->display) + selection_data->display = gdk_display_get_default (); if (target == gdk_atom_intern_static_string ("UTF8_STRING")) { NSString *s = [pasteboard stringForType:NSStringPboardType]; |