Commit e243c269 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

same fix as below for ID-based DND types.

2005-03-23  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpselectiondata.c (gimp_selection_data_get_image)
	(gimp_selection_data_get_component)
	(gimp_selection_data_get_item): same fix as below for ID-based DND
	types.
parent ec7fb058
2005-03-23 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpselectiondata.c (gimp_selection_data_get_image)
(gimp_selection_data_get_component)
(gimp_selection_data_get_item): same fix as below for ID-based DND
types.
2005-03-23 Sven Neumann <sven@gimp.org>
* libgimp/gimpbrushmenu.c
......
......@@ -535,8 +535,9 @@ gimp_selection_data_get_image (GtkSelectionData *selection,
return NULL;
}
id = (gchar *) selection->data;
id = g_strndup (selection->data, selection->length);
ID = atoi (id);
g_free (id);
if (! ID)
return NULL;
......@@ -582,10 +583,15 @@ gimp_selection_data_get_component (GtkSelectionData *selection,
return NULL;
}
id = (gchar *) selection->data;
id = g_strndup (selection->data, selection->length);
if (sscanf (id, "%i:%i", &ID, &ch) != 2)
return NULL;
{
g_free (id);
return NULL;
}
g_free (id);
if (! ID)
return NULL;
......@@ -631,8 +637,9 @@ gimp_selection_data_get_item (GtkSelectionData *selection,
return NULL;
}
id = (gchar *) selection->data;
id = g_strndup (selection->data, selection->length);
ID = atoi (id);
g_free (id);
if (! ID)
return NULL;
......
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