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:

committed by
Sven Neumann

parent
c7f25d0c81
commit
6e77b577dc
@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user