[gimp] app: do not raise a warning when failing to deserialize symmetry...
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: do not raise a warning when failing to deserialize symmetry...
- Date: Sun, 1 Apr 2018 16:22:57 +0000 (UTC)
commit c9df2a6879615bee0d0f1f3ae75ebe09a98f397f
Author: Jehan <jehan girinstud io>
Date: Sun Apr 1 18:16:54 2018 +0200
app: do not raise a warning when failing to deserialize symmetry...
... parasite.
Not sure if that should be considered a bug. On one hand, it should
because that's core code. On the other hand, symmetry saving currently
uses parasites, which is a feature which can also be used by people
randomly. So "theoretically", there could be any data in a parasite and
we should not assume specific format.
Anyway still keep the error message but just print to standard error
output instead. Also print a bit more details (parasite name and
contents) as it would help for debugging when such a case were to occur.
app/core/gimpsymmetry.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpsymmetry.c b/app/core/gimpsymmetry.c
index d11567d..c4090f8 100644
--- a/app/core/gimpsymmetry.c
+++ b/app/core/gimpsymmetry.c
@@ -428,7 +428,6 @@ gimp_symmetry_from_parasite (const GimpParasite *parasite,
g_return_val_if_fail (strcmp (gimp_parasite_name (parasite),
parasite_name) == 0,
NULL);
- g_free (parasite_name);
str = gimp_parasite_data (parasite);
g_return_val_if_fail (str != NULL, NULL);
@@ -445,12 +444,15 @@ gimp_symmetry_from_parasite (const GimpParasite *parasite,
NULL,
&error))
{
- g_warning ("Failed to deserialize symmetry parasite: %s", error->message);
+ g_printerr ("Failed to deserialize symmetry parasite: %s\n"
+ "\t- parasite name: %s\n\t- parasite data: %s\n",
+ error->message, parasite_name, str);
g_error_free (error);
g_object_unref (symmetry);
symmetry = NULL;
}
+ g_free (parasite_name);
if (symmetry)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]