Mesa (master): r300g: Abort if draw_create() fails
Marek Olšák
mareko at kemper.freedesktop.org
Thu Dec 2 23:51:28 UTC 2010
Module: Mesa
Branch: master
Commit: 7ed65f462aeebbdb7e48da365c947cd8a6ed9e5c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ed65f462aeebbdb7e48da365c947cd8a6ed9e5c
Author: nobled <nobled at dreamwidth.org>
Date: Thu Dec 2 22:49:05 2010 +0000
r300g: Abort if draw_create() fails
The other drivers need to be updated to do this, too.
---
src/gallium/drivers/r300/r300_context.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index f1c7334..9589a49 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -441,6 +441,8 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
if (!r300screen->caps.has_tcl) {
/* Create a Draw. This is used for SW TCL. */
r300->draw = draw_create(&r300->context);
+ if (r300->draw == NULL)
+ goto fail;
/* Enable our renderer. */
draw_set_rasterize_stage(r300->draw, r300_draw_stage(r300));
/* Disable converting points/lines to triangles. */
More information about the mesa-commit
mailing list