[gimp] libgimpconfig: remove more g_assert().
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpconfig: remove more g_assert().
- Date: Thu, 10 Feb 2022 20:28:01 +0000 (UTC)
commit 40bebec27318c24727d54e286549729b26088bcb
Author: Jehan <jehan girinstud io>
Date: Thu Feb 10 21:25:03 2022 +0100
libgimpconfig: remove more g_assert().
As discussed with mitch on IRC, these asserts make no sense. They can
happen if we fail to parse user-side data. Also currently deserialize()
does not even pass the GError down so we would always assert on failed
parsing.
What must be done instead if change the signature of deserialize() and
all its implementations, with a GError arg. Then this GError will
properly bubble up to the caller for appropriate handling.
libgimpconfig/gimpconfig-iface.c | 6 ------
1 file changed, 6 deletions(-)
---
diff --git a/libgimpconfig/gimpconfig-iface.c b/libgimpconfig/gimpconfig-iface.c
index 65e83c4eca..8052c7e0f5 100644
--- a/libgimpconfig/gimpconfig-iface.c
+++ b/libgimpconfig/gimpconfig-iface.c
@@ -539,9 +539,6 @@ gimp_config_deserialize_stream (GimpConfig *config,
gimp_scanner_unref (scanner);
- if (! success)
- g_assert (error == NULL || *error != NULL);
-
return success;
}
@@ -586,9 +583,6 @@ gimp_config_deserialize_string (GimpConfig *config,
gimp_scanner_unref (scanner);
- if (! success)
- g_assert (error == NULL || *error != NULL);
-
return success;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]