static struct wlr_output *
output_by_name(struct server *server, const char *name)
{
+ assert(name != NULL);
struct output *output;
wl_list_for_each(output, &server->outputs, link) {
if (!strcasecmp(output->wlr_output->name, name)) {
if (dev->type == WLR_INPUT_DEVICE_POINTER) {
wlr_log(WLR_INFO, "map pointer to output %s\n",
dev->pointer->output_name);
- struct wlr_output *output =
- output_by_name(seat->server, dev->pointer->output_name);
+ struct wlr_output *output = NULL;
+ if (dev->pointer->output_name != NULL) {
+ output = output_by_name(seat->server, dev->pointer->output_name);
+ }
wlr_cursor_map_input_to_output(seat->cursor, dev, output);
wlr_cursor_map_input_to_region(seat->cursor, dev, NULL);
}