aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-08 18:43:10 -0400
committerTed Gould <ted@canonical.com>2009-10-08 18:43:10 -0400
commitbece9de31705d57c83822ce3ece6dd24f92b9283 (patch)
tree7562962be76b7578f6be21964f70ca825ccea6ae /libindicator
parentf4b307cda5b10c41dd733d6189fd5a1ce7fe3111 (diff)
downloadlibayatana-indicator-bece9de31705d57c83822ce3ece6dd24f92b9283.tar.gz
libayatana-indicator-bece9de31705d57c83822ce3ece6dd24f92b9283.tar.bz2
libayatana-indicator-bece9de31705d57c83822ce3ece6dd24f92b9283.zip
Making it so that we're not using g_return_if_fail as it messes up the test suite.
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-object.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index afeaf19..06ca48f 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -83,14 +83,20 @@ indicator_object_finalize (GObject *object)
IndicatorObject *
indicator_object_new_from_file (const gchar * file)
{
- g_return_val_if_fail(file != NULL, NULL);
+ if (file != NULL)
+ return NULL;
GModule * module = g_module_open(file,
G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
- g_return_val_if_fail(module != NULL, NULL);
+ if(module != NULL) {
+ g_warning("Unable to load module: %s", file);
+ return NULL;
+ }
get_version_t lget_version = NULL;
- g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_VERSION_S, (gpointer *)(&lget_version)), FALSE);
+ if (!g_module_symbol(module, INDICATOR_GET_VERSION_S, (gpointer *)(&lget_version)))
+ return NULL;
+
if (!INDICATOR_VERSION_CHECK(lget_version())) {
g_warning("Indicator using API version '%s' we're expecting '%s'", lget_version(), INDICATOR_VERSION);
return NULL;