summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-12-02 20:28:49 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2009-12-02 20:38:51 +0000
commit370157f4932cf9067ba81c8bd5a311aff610882b (patch)
treea69725ae05764cb7bb00e956c001d08cd54a35d7
parentad68881b670aabf8dbfd3b954e8796f91260579d (diff)
batch: Avoid flushing a NULL batch
During shutdown from a FatalError during batchbuffer submission, it is possible for the batch_ptr to be NULL, so we must be careful not to append a flush on this error path. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/i830_accel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/i830_accel.c b/src/i830_accel.c
index 4302eca0..17c34090 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -58,7 +58,7 @@ void I830Sync(ScrnInfoPtr scrn)
if (I810_DEBUG & (DEBUG_VERBOSE_ACCEL | DEBUG_VERBOSE_SYNC))
ErrorF("I830Sync\n");
- if (!scrn->vtSema || !intel->batch_bo)
+ if (!scrn->vtSema || !intel->batch_bo || !intel->batch_ptr)
return;
intel_batch_flush(scrn, TRUE);