forked from enlightenment/efl
ecore-wl: Check for existance of data device manager
@fix: Don't segfault if the running compositor never creates a data device manager. Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
6699d427c1
commit
44b3cd1564
|
@ -349,11 +349,14 @@ _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id)
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue