diff options
author | Richard Hult <richard@imendio.com> | 2007-12-03 19:53:56 +0000 |
---|---|---|
committer | Richard Hult <rhult@src.gnome.org> | 2007-12-03 19:53:56 +0000 |
commit | 4c1bab5db8e3fd50e5ee28a26a6755d1fc01282b (patch) | |
tree | 9ce06dddf976171bafb6f2ee280fae04a33ee68e | |
parent | 4e99673620b78eb6f3c1720397bbcfe54a3361a7 (diff) | |
download | gdk-pixbuf-4c1bab5db8e3fd50e5ee28a26a6755d1fc01282b.tar.gz |
Merged from trunk:
2007-12-03 Richard Hult <richard@imendio.com>
Merged from trunk:
* gtk/gtkquartz.c: (_gtk_quartz_set_selection_data_for_pasteboard):
Don't crash when dragging from a source that doesn't support uri
lists (bug #499868, Paul Davis).
svn path=/branches/gtk-2-12/; revision=19103
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gtk/gtkquartz.c | 14 |
2 files changed, 16 insertions, 6 deletions
@@ -2,6 +2,14 @@ Merged from trunk: + * gtk/gtkquartz.c: (_gtk_quartz_set_selection_data_for_pasteboard): + Don't crash when dragging from a source that doesn't support uri + lists (bug #499868, Paul Davis). + +2007-12-03 Richard Hult <richard@imendio.com> + + Merged from trunk: + * gdk/quartz/gdkwindow-quartz.c: (gdk_window_impl_quartz_begin_paint_region): Don't crash when a parent relative bg pixmap is set, and no parent has a bg diff --git a/gtk/gtkquartz.c b/gtk/gtkquartz.c index 273666d5f..a8d971c05 100644 --- a/gtk/gtkquartz.c +++ b/gtk/gtkquartz.c @@ -220,7 +220,7 @@ _gtk_quartz_get_selection_data_from_pasteboard (NSPasteboard *pasteboard, NSURL *url = [NSURL URLFromPasteboard:pasteboard]; selection_data->target = gdk_atom_intern_static_string ("text/uri-list"); - + uris[0] = (gchar *) [[url description] UTF8String]; uris[1] = NULL; gtk_selection_data_set_uris (selection_data, uris); @@ -295,14 +295,16 @@ _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard, &list); if (count > 0) - result = g_uri_list_extract_uris (list[0]); - g_strfreev (list); + { + result = g_uri_list_extract_uris (list[0]); - url = [NSURL URLWithString:[NSString stringWithUTF8String:result[0]]]; - [url writeToPasteboard:pasteboard]; + url = [NSURL URLWithString:[NSString stringWithUTF8String:result[0]]]; + [url writeToPasteboard:pasteboard]; - g_strfreev (result); + g_strfreev (result); + } + g_strfreev (list); } else [pasteboard setData:[NSData dataWithBytesNoCopy:selection_data->data |