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.90~149^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F453%2Fhead;p=tigervnc.git Make RandR callbacks optional as they were before --- 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