mirror of https://github.com/GNOME/gimp.git
libgimpconfig: do not add NULL to a GStrv.
gimp_scanner_parse_string() transforms the empty string into NULL, which might be what we want elsewhere, but definitely not for GStrv since NULL is the end flag for the string array.
This commit is contained in:
parent
79faa06693
commit
85a686b8c5
|
@ -123,13 +123,7 @@ gimp_config_deserialize_strv (GValue *value,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Not an error for scanned string to be empty.*/
|
g_strv_builder_add (builder, scanned_string ? scanned_string : "");
|
||||||
|
|
||||||
/* Adding string to builder DOES not transfer ownership,
|
|
||||||
* the builder will copy the string.
|
|
||||||
*/
|
|
||||||
g_strv_builder_add (builder, scanned_string);
|
|
||||||
|
|
||||||
g_free (scanned_string);
|
g_free (scanned_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,4 +146,4 @@ gimp_config_deserialize_strv (GValue *value,
|
||||||
g_strv_builder_unref (builder);
|
g_strv_builder_unref (builder);
|
||||||
|
|
||||||
return result_token;
|
return result_token;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue