diff options
author | Brian <[email protected]> | 2007-08-14 11:56:59 +0100 |
---|---|---|
committer | Brian <[email protected]> | 2007-08-14 11:58:37 +0100 |
commit | dc73217294efcba83c46183ed2f208250217486f (patch) | |
tree | 1a79d59f479740d58c2bad548a386efa8c71889f /src/mesa/main/texobj.c | |
parent | 5dab3bf4bc94ac45e4d25c75dc09fbd6f4a6025e (diff) |
Fix a few more problems with freeing FBOs/textures during context destruction.
Free FBOs before textures since the later may be referenced by the former.
Need to bind the context we're destroying if there isn't a current context
so that ctx->DeleteTexture() etc can be used.
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r-- | src/mesa/main/texobj.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index ac70e5a22ec..ea3328a047e 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -287,7 +287,10 @@ _mesa_reference_texobj(struct gl_texture_object **ptr, if (deleteFlag) { GET_CURRENT_CONTEXT(ctx); - ctx->Driver.DeleteTexture(ctx, oldTex); + if (ctx) + ctx->Driver.DeleteTexture(ctx, oldTex); + else + _mesa_problem(NULL, "Unable to delete texture, no context"); } *ptr = NULL; |