diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index dd0d716907..715eff3ea8 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -721,7 +721,7 @@ xwl_output_set_name(struct xwl_output *xwl_output, const char *name) /* And leases' names as well */ xorg_list_for_each_entry(lease, &pScrPriv->leases, list) { for (i = 0; i < lease->numOutputs; i++) { - if (!strcmp(name, pScrPriv->outputs[i]->name)) { + if (!strcmp(name, lease->outputs[i]->name)) { ErrorF("A lease output named '%s' already exists", name); return; }