summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-11-27 15:24:54 (GMT)
committerAleksander Morgado <aleksander@lanedo.com>2012-11-27 15:25:51 (GMT)
commit562055b53b7878e7bb0e240ae121d4bcd6926e93 (patch)
tree539fd1c9aa8b30b660583d706cfaf1c61e86400f
parente97b229e663dcd6d24a15fef51f13e2886ddf134 (diff)
libmm-glib,manager: client creation may fail, avoid explicit MM_MANAGER() cast
-rw-r--r--libmm-glib/mm-manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libmm-glib/mm-manager.c b/libmm-glib/mm-manager.c
index 81f2041..3740200 100644
--- a/libmm-glib/mm-manager.c
+++ b/libmm-glib/mm-manager.c
@@ -108,7 +108,10 @@ MMManager *
mm_manager_new_finish (GAsyncResult *res,
GError **error)
{
- return MM_MANAGER (mm_gdbus_object_manager_client_new_finish (res, error));
+ GDBusObjectManager *ret;
+
+ ret = mm_gdbus_object_manager_client_new_finish (res, error);
+ return (ret ? MM_MANAGER (ret) : NULL);
}
/**