From 40bebec27318c24727d54e286549729b26088bcb Mon Sep 17 00:00:00 2001 From: Jehan Date: Thu, 10 Feb 2022 21:25:03 +0100 Subject: [PATCH] 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; }