From d8428b25440c73c280bb47a6487a70c82a204603 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 1 May 2020 18:35:24 +0100 Subject: [PATCH] ipc/client: Don't assert on devices with no output --- src/xrt/ipc/ipc_client_device.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xrt/ipc/ipc_client_device.c b/src/xrt/ipc/ipc_client_device.c index 2f8c5e2a8..3a94ab928 100644 --- a/src/xrt/ipc/ipc_client_device.c +++ b/src/xrt/ipc/ipc_client_device.c @@ -156,9 +156,13 @@ ipc_client_device_create(ipc_connection_t *ipc_c, uint32_t device_id) icd->base.inputs = &ism->inputs[idev->first_input_index]; icd->base.num_inputs = idev->num_inputs; - assert(idev->num_outputs > 0); - icd->base.outputs = &ism->outputs[idev->first_output_index]; + // Setup outputs, if any point directly into the shared memory. icd->base.num_outputs = idev->num_outputs; + if (idev->num_outputs > 0) { + icd->base.outputs = &ism->outputs[idev->first_output_index]; + } else { + icd->base.outputs = NULL; + } // Setup variable tracker. u_var_add_root(icd, icd->base.str, true);