Commit 6e77b577 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

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.
parent c7f25d0c
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> 2004-07-13 Sven Neumann <sven@gimp.org>
* plug-ins/common/jpeg.c: override the output_message error * plug-ins/common/jpeg.c: override the output_message error
......
...@@ -108,7 +108,10 @@ gimp_g_value_get_memsize (GValue *value) ...@@ -108,7 +108,10 @@ gimp_g_value_get_memsize (GValue *value)
if (G_VALUE_HOLDS_STRING (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)) else if (G_VALUE_HOLDS_BOXED (value))
{ {
......
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