mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
ipc/client: Don't assert on devices with no output
This commit is contained in:
parent
7ab1ca727f
commit
d8428b2544
|
@ -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.inputs = &ism->inputs[idev->first_input_index];
|
||||||
icd->base.num_inputs = idev->num_inputs;
|
icd->base.num_inputs = idev->num_inputs;
|
||||||
|
|
||||||
assert(idev->num_outputs > 0);
|
// Setup outputs, if any point directly into the shared memory.
|
||||||
icd->base.outputs = &ism->outputs[idev->first_output_index];
|
|
||||||
icd->base.num_outputs = idev->num_outputs;
|
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.
|
// Setup variable tracker.
|
||||||
u_var_add_root(icd, icd->base.str, true);
|
u_var_add_root(icd, icd->base.str, true);
|
||||||
|
|
Loading…
Reference in a new issue