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:

committed by
Aleksander Morgado

parent
84bdcb04ed
commit
76d52c2df3
@@ -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);
|
||||
|
Reference in New Issue
Block a user