huawei: avoid calling g_object_unref on NULL

This patch prevents connect_3gpp_context_complete_and_free from calling
'g_object_unref (ctx->data)' when connect_3gpp finds no data port (i.e.
ctx->data is set to NULL).
This commit is contained in:
Ben Chan
2014-01-08 10:09:06 +01:00
committed by Aleksander Morgado
parent 84bdcb04ed
commit 76d52c2df3
+2 -1
View File
@@ -69,7 +69,8 @@ connect_3gpp_context_complete_and_free (Connect3gppContext *ctx)
g_simple_async_result_complete_in_idle (ctx->result);
g_object_unref (ctx->cancellable);
g_object_unref (ctx->result);
g_object_unref (ctx->data);
if (ctx->data)
g_object_unref (ctx->data);
g_object_unref (ctx->primary);
g_object_unref (ctx->modem);
g_object_unref (ctx->self);