GUACAMOLE-306: Merge VNC client null check fix.
This commit is contained in:
commit
6d2cfdabf8
@ -113,8 +113,9 @@ int guac_vnc_clipboard_end_handler(guac_user* user, guac_stream* stream) {
|
|||||||
guac_iconv(GUAC_READ_UTF8, &input, vnc_client->clipboard->length,
|
guac_iconv(GUAC_READ_UTF8, &input, vnc_client->clipboard->length,
|
||||||
writer, &output, sizeof(output_data));
|
writer, &output, sizeof(output_data));
|
||||||
|
|
||||||
/* Send via VNC */
|
/* Send via VNC only if finished connecting */
|
||||||
SendClientCutText(rfb_client, output_data, output - output_data);
|
if (rfb_client != NULL)
|
||||||
|
SendClientCutText(rfb_client, output_data, output - output_data);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -30,11 +30,14 @@ int guac_vnc_user_mouse_handler(guac_user* user, int x, int y, int mask) {
|
|||||||
|
|
||||||
guac_client* client = user->client;
|
guac_client* client = user->client;
|
||||||
guac_vnc_client* vnc_client = (guac_vnc_client*) client->data;
|
guac_vnc_client* vnc_client = (guac_vnc_client*) client->data;
|
||||||
|
rfbClient* rfb_client = vnc_client->rfb_client;
|
||||||
|
|
||||||
/* Store current mouse location */
|
/* Store current mouse location */
|
||||||
guac_common_cursor_move(vnc_client->display->cursor, user, x, y);
|
guac_common_cursor_move(vnc_client->display->cursor, user, x, y);
|
||||||
|
|
||||||
SendPointerEvent(vnc_client->rfb_client, x, y, mask);
|
/* Send VNC event only if finished connecting */
|
||||||
|
if (rfb_client != NULL)
|
||||||
|
SendPointerEvent(rfb_client, x, y, mask);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -42,8 +45,11 @@ int guac_vnc_user_mouse_handler(guac_user* user, int x, int y, int mask) {
|
|||||||
int guac_vnc_user_key_handler(guac_user* user, int keysym, int pressed) {
|
int guac_vnc_user_key_handler(guac_user* user, int keysym, int pressed) {
|
||||||
|
|
||||||
guac_vnc_client* vnc_client = (guac_vnc_client*) user->client->data;
|
guac_vnc_client* vnc_client = (guac_vnc_client*) user->client->data;
|
||||||
|
rfbClient* rfb_client = vnc_client->rfb_client;
|
||||||
|
|
||||||
SendKeyEvent(vnc_client->rfb_client, keysym, pressed);
|
/* Send VNC event only if finished connecting */
|
||||||
|
if (rfb_client != NULL)
|
||||||
|
SendKeyEvent(rfb_client, keysym, pressed);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user