From: Jan Grulich Date: Thu, 4 May 2017 06:58:37 +0000 (+0200) Subject: Make RandR callbacks optional as they were before X-Git-Tag: v1.8.0~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cd580eedf346de9fb66229809cfedd982b043a7a;p=tigervnc.git Make RandR callbacks optional as they were before (cherry picked from commit 994296ebd00bb26a171febaef749d102f747c1e9) --- 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