From de1ae549fa469b771704b2fb06eeb98a9eca110b Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 15 Apr 2019 10:43:57 +0200 Subject: [PATCH] shared-qmi: config list may be empty Reported by: Enrico Mioso --- src/mm-shared-qmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mm-shared-qmi.c b/src/mm-shared-qmi.c index b72c6a21..123bda7f 100644 --- a/src/mm-shared-qmi.c +++ b/src/mm-shared-qmi.c @@ -2871,10 +2871,9 @@ load_carrier_config_step (GTask *task) case LOAD_CARRIER_CONFIG_STEP_LAST: /* We will now store the loaded information so that we can later on use it * if needed during the automatic carrier config switching operation */ - g_assert (!priv->config_list); g_assert (priv->config_active_i < 0 && !priv->config_active_default); g_assert (ctx->config_active_i >= 0 || ctx->config_active_default); - priv->config_list = g_array_ref (ctx->config_list); + priv->config_list = ctx->config_list ? g_array_ref (ctx->config_list) : NULL; priv->config_active_i = ctx->config_active_i; priv->config_active_default = ctx->config_active_default;