aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unix/xserver/hw/vnc/vncHooks.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/unix/xserver/hw/vnc/vncHooks.c b/unix/xserver/hw/vnc/vncHooks.c
index ef340b35..5b90f531 100644
--- a/unix/xserver/hw/vnc/vncHooks.c
+++ b/unix/xserver/hw/vnc/vncHooks.c
@@ -312,9 +312,13 @@ int vncHooksInit(int scrIdx)
#ifdef RANDR
rp = rrGetScrPriv(pScreen);
if (rp) {
- wrap(vncHooksScreen, rp, rrSetConfig, vncHooksRandRSetConfig);
- wrap(vncHooksScreen, rp, rrScreenSetSize, vncHooksRandRScreenSetSize);
- wrap(vncHooksScreen, rp, rrCrtcSet, vncHooksRandRCrtcSet);
+ /* Some RandR callbacks are optional */
+ if (rp->rrSetConfig)
+ wrap(vncHooksScreen, rp, rrSetConfig, vncHooksRandRSetConfig);
+ if (rp->rrScreenSetSize)
+ wrap(vncHooksScreen, rp, rrScreenSetSize, vncHooksRandRScreenSetSize);
+ if (rp->rrCrtcSet)
+ wrap(vncHooksScreen, rp, rrCrtcSet, vncHooksRandRCrtcSet);
}
#endif