sna: Avoid the NULL damage deref

Fixes x11perf -wdcircle100 -time 1 -repeat 1 -rop GXxor

Reported-by: Fryderyk Dziarmagowski <fdziarmagowski@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43084
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-11-19 16:11:42 +00:00
parent 4a86ec5ddb
commit 297f7680cf
1 changed files with 2 additions and 1 deletions

View File

@ -7940,7 +7940,8 @@ sna_push_pixels_solid_blt(GCPtr gc,
RegionTranslate(region, dx, dy);
assert_pixmap_contains_box(pixmap, RegionExtents(region));
sna_damage_add(damage, region);
if (damage)
sna_damage_add(damage, region);
DBG(("%s: upload(%d, %d, %d, %d)\n", __FUNCTION__,
region->extents.x1, region->extents.y1,