main: check data_control exist before using it

fixes #141
pull/143/head
shironeko 2022-07-02 11:06:58 -04:00 committed by Andri Yngvason
parent 5e3c53b8db
commit 4209a4deb2
1 changed files with 1 additions and 1 deletions

View File

@ -484,7 +484,7 @@ static void on_client_cut_text(struct nvnc* server, const char* text, uint32_t l
{ {
struct wayvnc* wayvnc = nvnc_get_userdata(server); struct wayvnc* wayvnc = nvnc_get_userdata(server);
if (!wayvnc->disable_input) { if (!wayvnc->disable_input && wayvnc->data_control.manager) {
data_control_to_clipboard(&wayvnc->data_control, text, len); data_control_to_clipboard(&wayvnc->data_control, text, len);
} }
} }