[gimp/gimp-2-10] app: relax precondition checks in gimp_operation_config_get_type()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: relax precondition checks in gimp_operation_config_get_type()
- Date: Fri, 13 Jul 2018 11:59:57 +0000 (UTC)
commit c743aed29d9de8048058624b5a358ec7aa0d7d70
Author: Michael Natterer <mitch gimp org>
Date: Fri Jul 13 13:55:24 2018 +0200
app: relax precondition checks in gimp_operation_config_get_type()
Only require the parent type if the requested type is not already
registered.
(cherry picked from commit 9ef39b507b652b8ed65c9a018666d75a6ffa8c00)
app/operations/gimp-operation-config.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/app/operations/gimp-operation-config.c b/app/operations/gimp-operation-config.c
index 904bc3dcc3..88ff32e90e 100644
--- a/app/operations/gimp-operation-config.c
+++ b/app/operations/gimp-operation-config.c
@@ -271,7 +271,6 @@ gimp_operation_config_get_type (Gimp *gimp,
g_return_val_if_fail (GIMP_IS_GIMP (gimp), G_TYPE_NONE);
g_return_val_if_fail (operation != NULL, G_TYPE_NONE);
- g_return_val_if_fail (g_type_is_a (parent_type, GIMP_TYPE_OBJECT), G_TYPE_NONE);
config_types = gimp_operation_config_get_type_table (gimp);
@@ -281,6 +280,9 @@ gimp_operation_config_get_type (Gimp *gimp,
{
GTypeQuery query;
+ g_return_val_if_fail (g_type_is_a (parent_type, GIMP_TYPE_OBJECT),
+ G_TYPE_NONE);
+
g_type_query (parent_type, &query);
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]