summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-12-29 12:51:27 +0100
committerKeith Packard <keithp@keithp.com>2009-12-29 11:04:07 -0800
commit0bd8f0cd7f3823ee17ae8c88fd3e004bfff9982d (patch)
tree2e27b0e81a420348fe7d6323b34e13ddbcb4fb40 /exa
parent40453bf7718f1c3d672b87e9d84991032cbef859 (diff)
EXA/classic: Fix crash with migration heuristic "smart".
Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'exa')
-rw-r--r--exa/exa_migration_classic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/exa/exa_migration_classic.c b/exa/exa_migration_classic.c
index 95189becc..871679ffc 100644
--- a/exa/exa_migration_classic.c
+++ b/exa/exa_migration_classic.c
@@ -75,6 +75,9 @@ exaPixmapIsDirty (PixmapPtr pPix)
if (pExaPixmap == NULL)
EXA_FatalErrorDebugWithRet(("EXA bug: exaPixmapIsDirty was called on a non-exa pixmap.\n"), TRUE);
+ if (!pExaPixmap->pDamage)
+ return FALSE;
+
return REGION_NOTEMPTY (pScreen, DamageRegion(pExaPixmap->pDamage)) ||
!REGION_EQUAL(pScreen, &pExaPixmap->validSys, &pExaPixmap->validFB);
}