forked from enlightenment/efl
edbus: Add ref to object and proxy in edbus_object/proxy_get
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi> SVN revision: 80704
This commit is contained in:
parent
4b874afdd9
commit
85192f5045
|
@ -194,7 +194,11 @@ edbus_object_get(EDBus_Connection *conn, const char *bus, const char *path)
|
|||
EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
|
||||
|
||||
obj = edbus_connection_name_object_get(conn, bus, path);
|
||||
if (obj) return obj;
|
||||
if (obj)
|
||||
{
|
||||
edbus_object_ref(obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
obj = calloc(1, sizeof(EDBus_Object));
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
||||
|
|
|
@ -204,7 +204,11 @@ edbus_proxy_get(EDBus_Object *obj, const char *interface)
|
|||
EINA_SAFETY_ON_NULL_RETURN_VAL(interface, NULL);
|
||||
|
||||
proxy = edbus_object_proxy_get(obj, interface);
|
||||
if (proxy) return proxy;
|
||||
if (proxy)
|
||||
{
|
||||
edbus_proxy_ref(proxy);
|
||||
return proxy;
|
||||
}
|
||||
|
||||
proxy = calloc(1, sizeof(EDBus_Proxy));
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
|
||||
|
|
Loading…
Reference in New Issue