From 994296ebd00bb26a171febaef749d102f747c1e9 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Thu, 4 May 2017 08:58:37 +0200 Subject: [PATCH] Make RandR callbacks optional as they were before --- unix/xserver/hw/vnc/vncHooks.c | 10 +++++++--- 1 file 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 -- 2.39.5