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-07 23:55:45 -08:00
committed by Aleksander Morgado
parent 84bdcb04ed
commit 76d52c2df3

View File

@@ -69,6 +69,7 @@ connect_3gpp_context_complete_and_free (Connect3gppContext *ctx)
g_simple_async_result_complete_in_idle (ctx->result); g_simple_async_result_complete_in_idle (ctx->result);
g_object_unref (ctx->cancellable); g_object_unref (ctx->cancellable);
g_object_unref (ctx->result); g_object_unref (ctx->result);
if (ctx->data)
g_object_unref (ctx->data); g_object_unref (ctx->data);
g_object_unref (ctx->primary); g_object_unref (ctx->primary);
g_object_unref (ctx->modem); g_object_unref (ctx->modem);