summaryrefslogtreecommitdiffstats
path: root/x11vnc/pointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/pointer.c')
-rw-r--r--x11vnc/pointer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/x11vnc/pointer.c b/x11vnc/pointer.c
index 56f6ccf..d2ec4c1 100644
--- a/x11vnc/pointer.c
+++ b/x11vnc/pointer.c
@@ -508,7 +508,7 @@ if (debug_scroll > 1) fprintf(stderr, "internal scrollbar: %dx%d\n", w, h);
static void pipe_pointer(int mask, int x, int y, rfbClientPtr client) {
- int can_input = 0, uid;
+ int can_input = 0, uid = 0;
allowed_input_t input;
ClientData *cd = (ClientData *) client->clientData;
char hint[MAX_BUTTONS * 20];
@@ -523,7 +523,9 @@ static void pipe_pointer(int mask, int x, int y, rfbClientPtr client) {
can_input = 1; /* XXX distinguish later */
}
}
- uid = cd->uid;
+ if (cd) {
+ uid = cd->uid;
+ }
if (! can_input) {
uid = -uid;
}