summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-04-27 16:05:50 -0700
committerEric Anholt <eric@anholt.net>2009-04-27 16:32:25 -0700
commitfbaf13c93511547c563129527797fbef8628652e (patch)
tree989272d6b8128551e0210bc8195498289b396349
parentab878118b9fb46c437a02f824d29f4a206e7fd80 (diff)
Don't clear the framebuffer if it isn't currently bound.
This segfault can be triggered in non-KMS memory init before the EnterVT, and will happen anyway at EnterVT time.
-rw-r--r--src/i830_memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 470734e0..54cee563 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1273,7 +1273,7 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn)
return NULL;
}
- if (!pI830->use_drm_mode && pI830->FbBase)
+ if (!pI830->use_drm_mode && pI830->FbBase && front_buffer->bound)
memset (pI830->FbBase + front_buffer->offset, 0, size);
return front_buffer;