From 967b22fed7216b7626604255c325478cc3bc2c6d Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 26 Oct 2007 20:03:07 +0000 Subject: [PATCH] don't pass NULL strings to gimp_message(). Fixes bug #490617. 2007-10-26 Sven Neumann * app/pdb/gimpprocedure.c (gimp_procedure_validate_args): don't pass NULL strings to gimp_message(). Fixes bug #490617. svn path=/trunk/; revision=23958 --- ChangeLog | 7 ++++++- NEWS | 3 ++- app/pdb/gimpprocedure.c | 9 +++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad52000719..8c779f837e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,12 @@ +2007-10-26 Sven Neumann + + * app/pdb/gimpprocedure.c (gimp_procedure_validate_args): don't pass + NULL strings to gimp_message(). Fixes bug #490617. + 2007-10-26 Sven Neumann Reenabled update of the histogram while doing color corrections - (bug 490182): + (bug #490182): * app/core/gimpviewable.[ch]: added new methods preview_freeze() and preview_thaw(). diff --git a/NEWS b/NEWS index 184daefff5..b3f0002584 100644 --- a/NEWS +++ b/NEWS @@ -12,9 +12,10 @@ Changes in GIMP 2.4.1 - fixed a minor display rendering problem - improved the workaround for broken graphics card drivers (bug #421466) -- fixed a crash with broken scripts (bug #490055) +- fixed a crash with broken scripts and plug-ins (bug #490055) - fixed potential syntax error in configure script (bug #490068) - fixed parsing of floating point numbers in Script-Fu (bug #490198) - fixed potential crash when converting an indexed image to RGB (bug #490048) - update the histogram while doing color corrections (bug #490182) +- fixed another crash with broken plug-ins (bug #490617). - translation updates diff --git a/app/pdb/gimpprocedure.c b/app/pdb/gimpprocedure.c index e6901a8c0a..40ad69f46b 100644 --- a/app/pdb/gimpprocedure.c +++ b/app/pdb/gimpprocedure.c @@ -607,6 +607,11 @@ gimp_procedure_validate_args (GimpProcedure *procedure, } else { + const gchar *value = g_value_get_string (&string_value); + + if (value == NULL) + value = "(null)"; + if (return_vals) { gimp_message (gimp, G_OBJECT (progress), @@ -616,7 +621,7 @@ gimp_procedure_validate_args (GimpProcedure *procedure, "(#%d, type %s). " "This value is out of range."), gimp_object_get_name (GIMP_OBJECT (procedure)), - g_value_get_string (&string_value), + value, g_param_spec_get_name (pspec), i + 1, g_type_name (spec_type)); } @@ -629,7 +634,7 @@ gimp_procedure_validate_args (GimpProcedure *procedure, "(#%d, type %s). " "This value is out of range."), gimp_object_get_name (GIMP_OBJECT (procedure)), - g_value_get_string (&string_value), + value, g_param_spec_get_name (pspec), i + 1, g_type_name (spec_type)); }