Commit f411b93c authored by Richard Hult's avatar Richard Hult Committed by Richard Hult

Don't crash when dragging from a source that doesn't support uri lists

2007-12-03  Richard Hult  <richard@imendio.com>

	* 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=/trunk/; revision=19102
parent 4a1478d6
2007-12-03 Richard Hult <richard@imendio.com>
* 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>
* gdk/quartz/gdkwindow-quartz.c:
......
......@@ -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);
url = [NSURL URLWithString:[NSString stringWithUTF8String:result[0]]];
[url writeToPasteboard:pasteboard];
g_strfreev (result);
}
g_strfreev (list);
}
else
[pasteboard setData:[NSData dataWithBytesNoCopy:selection_data->data
......@@ -310,5 +312,3 @@ _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard,
freeWhenDone:NO]
forType:type];
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment