diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-12-02 20:28:49 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-12-02 20:38:51 +0000 |
commit | 370157f4932cf9067ba81c8bd5a311aff610882b (patch) | |
tree | a69725ae05764cb7bb00e956c001d08cd54a35d7 | |
parent | ad68881b670aabf8dbfd3b954e8796f91260579d (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.c | 2 |
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); |