summaryrefslogtreecommitdiffstats
path: root/x11vnc/connections.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/connections.c')
-rw-r--r--x11vnc/connections.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/x11vnc/connections.c b/x11vnc/connections.c
index 97d4c19..f6fd6aa 100644
--- a/x11vnc/connections.c
+++ b/x11vnc/connections.c
@@ -2783,6 +2783,7 @@ void reverse_connect(char *str) {
void set_vnc_connect_prop(char *str) {
RAWFB_RET_VOID
#if !NO_X11
+ if (vnc_connect_prop == None) return;
XChangeProperty(dpy, rootwin, vnc_connect_prop, XA_STRING, 8,
PropModeReplace, (unsigned char *)str, strlen(str));
#else
@@ -2793,6 +2794,7 @@ void set_vnc_connect_prop(char *str) {
void set_x11vnc_remote_prop(char *str) {
RAWFB_RET_VOID
#if !NO_X11
+ if (x11vnc_remote_prop == None) return;
XChangeProperty(dpy, rootwin, x11vnc_remote_prop, XA_STRING, 8,
PropModeReplace, (unsigned char *)str, strlen(str));
#else
@@ -3280,6 +3282,9 @@ int set_xprop(char *prop, Window win, char *value) {
win = rootwin;
}
aprop = XInternAtom(dpy, prop, False);
+ if (aprop == None) {
+ return rc;
+ }
rc = XChangeProperty(dpy, win, aprop, XA_STRING, 8,
PropModeReplace, (unsigned char *)value, strlen(value));
return rc;