Commit ec7fb058 authored by Sven Neumann's avatar Sven Neumann
Browse files

added a g_warning() if UTF-8 validation fails

parent 2bea01ca
......@@ -663,12 +663,15 @@ gimp_selection_data_get_name (GtkSelectionData *selection)
{
gchar *name = g_strndup (selection->data, selection->length);
if (g_utf8_validate (name, -1, NULL))
return name;
g_free (name);
if (! g_utf8_validate (name, -1, NULL))
{
g_warning ("Received invalid selection data "
"(doesn't validate as UTF-8)!");
g_free (name);
return NULL;
}
return NULL;
return name;
}
GimpBrush *
......
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