summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authornobled <[email protected]>2010-12-02 22:49:05 +0000
committerMarek Olšák <[email protected]>2010-12-03 00:50:58 +0100
commit7ed65f462aeebbdb7e48da365c947cd8a6ed9e5c (patch)
treeaa0c6cc8d1b6ebcf3835d7ac8895ee40309a4ed5 /src/gallium/drivers/r300
parentd5bf23180664ccd682874ab628ed472e7c8c361a (diff)
r300g: Abort if draw_create() fails
The other drivers need to be updated to do this, too.
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_context.c2
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 f1c73345781..9589a491b81 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. */