diff --git a/src/protocols/vnc/vnc_handlers.c b/src/protocols/vnc/vnc_handlers.c index 020f2419..cbf0681b 100644 --- a/src/protocols/vnc/vnc_handlers.c +++ b/src/protocols/vnc/vnc_handlers.c @@ -141,9 +141,13 @@ void guac_vnc_cursor(rfbClient* client, int x, int y, int w, int h, int bpp) { pthread_mutex_unlock(&(gc->send_lock)); + pthread_mutex_lock(&(gc->send_lock)); + /* Update cursor */ guac_protocol_send_cursor(socket, x, y, cursor_layer, 0, 0, w, h); + pthread_mutex_unlock(&(gc->send_lock)); + /* Free surface */ cairo_surface_destroy(surface); free(buffer);