[libpeas] Warn if activate or deactivate are not implemented
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Warn if activate or deactivate are not implemented
- Date: Tue, 17 Jul 2012 18:46:53 +0000 (UTC)
commit a4e55fd3dcf7bf37ce9cc21c87a2bbb68ce6fdff
Author: Garrett Regier <garrettregier gmail com>
Date: Tue Jul 17 11:41:43 2012 -0700
Warn if activate or deactivate are not implemented
https://bugzilla.gnome.org/show_bug.cgi?id=679508
libpeas/peas-activatable.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/libpeas/peas-activatable.c b/libpeas/peas-activatable.c
index 2658aed..434642c 100644
--- a/libpeas/peas-activatable.c
+++ b/libpeas/peas-activatable.c
@@ -91,8 +91,9 @@ peas_activatable_activate (PeasActivatable *activatable)
g_return_if_fail (PEAS_IS_ACTIVATABLE (activatable));
iface = PEAS_ACTIVATABLE_GET_IFACE (activatable);
- if (iface->activate != NULL)
- iface->activate (activatable);
+ g_return_if_fail (iface->activate != NULL);
+
+ iface->activate (activatable);
}
/**
@@ -113,8 +114,9 @@ peas_activatable_deactivate (PeasActivatable *activatable)
g_return_if_fail (PEAS_IS_ACTIVATABLE (activatable));
iface = PEAS_ACTIVATABLE_GET_IFACE (activatable);
- if (iface->deactivate != NULL)
- iface->deactivate (activatable);
+ g_return_if_fail (iface->deactivate != NULL);
+
+ iface->deactivate (activatable);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]