@fix: Don't segfault if the running compositor never creates a data
device manager.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
wl_array_init(&input->data_types);
- input->data_device =
- wl_data_device_manager_get_data_device(ewd->wl.data_device_manager,
- input->seat);
- wl_data_device_add_listener(input->data_device,
- &_ecore_wl_data_listener, input);
+ if (ewd->wl.data_device_manager)
+ {
+ input->data_device =
+ wl_data_device_manager_get_data_device(ewd->wl.data_device_manager,
+ input->seat);
+ wl_data_device_add_listener(input->data_device,
+ &_ecore_wl_data_listener, input);
+ }
ewd->input = input;
}