[libpeas] Don't warn multiple times if peas_gi_get_method_info() fails



commit 2b4f261a3d583a55b9eb11a65e978c2e230e0050
Author: Garrett Regier <alias301 gmail com>
Date:   Fri Mar 4 22:43:59 2011 -0800

    Don't warn multiple times if peas_gi_get_method_info() fails

 libpeas/peas-extension-set.c |    5 ++++-
 libpeas/peas-extension.c     |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/libpeas/peas-extension-set.c b/libpeas/peas-extension-set.c
index e7e371d..6754af2 100644
--- a/libpeas/peas-extension-set.c
+++ b/libpeas/peas-extension-set.c
@@ -517,7 +517,10 @@ peas_extension_set_call_valist (PeasExtensionSet *set,
   g_return_val_if_fail (method_name != NULL, FALSE);
 
   callable_info = peas_gi_get_method_info (set->priv->exten_type, method_name);
-  g_return_val_if_fail (callable_info != NULL, FALSE);
+
+  /* Already warned */
+  if (callable_info == NULL)
+    return FALSE;
 
   n_args = g_callable_info_get_n_args (callable_info);
   g_return_val_if_fail (n_args >= 0, FALSE);
diff --git a/libpeas/peas-extension.c b/libpeas/peas-extension.c
index 0a434d1..7392766 100644
--- a/libpeas/peas-extension.c
+++ b/libpeas/peas-extension.c
@@ -240,7 +240,10 @@ peas_extension_call_valist (PeasExtension *exten,
   g_return_val_if_fail (method_name != NULL, FALSE);
 
   callable_info = peas_gi_get_method_info (exten->priv->exten_type, method_name);
-  g_return_val_if_fail (callable_info != NULL, FALSE);
+
+  /* Already warned */
+  if (callable_info == NULL)
+    return FALSE;
 
   n_args = g_callable_info_get_n_args (callable_info);
   g_return_val_if_fail (n_args >= 0, FALSE);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]