227_null_ptr_midispcur.patch 366 B

12345678910111213141516
  1. diff --git a/mi/midispcur.c b/mi/midispcur.c
  2. index 24b9a70..266c7e0 100644
  3. --- a/mi/midispcur.c
  4. +++ b/mi/midispcur.c
  5. @@ -466,6 +466,10 @@ miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
  6. GCPtr pGC;
  7. pBuffer = miGetDCDevice(pDev, pScreen);
  8. +
  9. + if (!pBuffer)
  10. + return FALSE;
  11. +
  12. pSave = pBuffer->pSave;
  13. pWin = pScreen->root;