Commit 95a2302b authored by Christian Hergert's avatar Christian Hergert

clang: check for NULL gvariant parameters

parent a2d5e65d
Pipeline #15976 passed with stage
in 17 minutes and 33 seconds
......@@ -548,7 +548,7 @@ ide_clang_client_call_async (IdeClangClient *self,
call = g_slice_new0 (Call);
call->self = g_object_ref (self);
call->method = g_strdup (method);
call->params = g_variant_ref_sink (params);
call->params = params ? g_variant_ref_sink (params) : NULL;
task = ide_task_new (self, cancellable, callback, user_data);
ide_task_set_source_tag (task, ide_clang_client_call_async);
......
......@@ -138,6 +138,7 @@ ide_clang_code_index_entries_next_entries_async (IdeCodeIndexEntries *entries,
g_autoptr(IdeTask) task = NULL;
g_assert (IDE_IS_CLANG_CODE_INDEX_ENTRIES (self));
g_assert (self->entries != NULL);
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
task = ide_task_new (self, cancellable, callback, user_data);
......
......@@ -424,7 +424,7 @@ ide_clang_proposals_flush (IdeClangProposals *self,
if (results != self->results)
{
g_clear_pointer (&self->results, g_variant_unref);
self->results = g_variant_ref (results);
self->results = results ? g_variant_ref (results) : NULL;
}
ide_clang_proposals_do_refilter (self, FALSE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment