mirror of https://github.com/GNOME/gimp.git
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:
parent
c7f25d0c81
commit
6e77b577dc
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue