Don't crash if cut_text cb isn't implemented

pull/3/head
Andri Yngvason 2020-12-06 20:00:49 +00:00
parent 86283fd8d1
commit 977f34224c
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,8 @@ static void vnc_client_got_cut_text(rfbClient* client, const char* text,
struct vnc_client* self = rfbClientGetClientData(client, NULL);
assert(self);
self->cut_text(self, text, len);
if (self->cut_text)
self->cut_text(self, text, len);
}
struct vnc_client* vnc_client_create(void)