handle NULL string values.

2004-07-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-utils.c (gimp_g_value_get_memsize): handle NULL
	string values.
This commit is contained in:
Sven Neumann 2004-07-13 11:54:09 +00:00 committed by Sven Neumann
parent c7f25d0c81
commit 6e77b577dc
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-07-13 Sven Neumann <sven@gimp.org>
* app/core/gimp-utils.c (gimp_g_value_get_memsize): handle NULL
string values.
2004-07-13 Sven Neumann <sven@gimp.org>
* plug-ins/common/jpeg.c: override the output_message error

View File

@ -108,7 +108,10 @@ gimp_g_value_get_memsize (GValue *value)
if (G_VALUE_HOLDS_STRING (value))
{
memsize += strlen (g_value_get_string (value)) + 1;
const gchar *str = g_value_get_string (value);
if (str)
memsize += strlen (str) + 1;
}
else if (G_VALUE_HOLDS_BOXED (value))
{