Commit 1179938c authored by Alex Goins's avatar Alex Goins

randr: Check rrPrivKey in RRHasScanoutPixmap()

RRHasScanoutPixmap() is called from xf86CheckHWCursor(), regardless of whether
or not RandR has been initialized.

As mentioned in commit 4226c6d0, it's possible that RandR has not been
initialized if the server is configured with Xinerama and there is more than one
X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion
failure that aborts the server:

      Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion
      key->initialized' failed.

Just as in commit 4226c6d0, fix the problem by checking
dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv.
Signed-off-by: Alex Goins's avatarAlex Goins <agoins@nvidia.com>
Acked-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 8eeff5d7)
parent 4912f693
Pipeline #180199 passed with stages
in 4 minutes and 46 seconds
......@@ -2012,9 +2012,15 @@ RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable)
Bool
RRHasScanoutPixmap(ScreenPtr pScreen)
{
rrScrPriv(pScreen);
rrScrPrivPtr pScrPriv;
int i;
/* Bail out if RandR wasn't initialized. */
if (!dixPrivateKeyRegistered(rrPrivKey))
return FALSE;
pScrPriv = rrGetScrPriv(pScreen);
if (!pScreen->is_output_slave)
return FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment