summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>1999-10-09 10:01:46 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>1999-10-09 10:01:46 +0000
commit7ec8d588abf67934edc78843dee28b9be509f4ca (patch)
treeff3f869ffc803f96b150d7d9ff019272f29399f3
parentf8b3fc54540b76c491cee6624c48ca935b07c4b0 (diff)
fixed reference count bug in save_TexImage3DEXT()
-rw-r--r--src/mesa/main/dlist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index b1a4ed05e0..fa13ce0afe 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1,4 +1,4 @@
-/* $Id: dlist.c,v 1.6 1999/10/08 09:27:10 keithw Exp $ */
+/* $Id: dlist.c,v 1.7 1999/10/09 10:01:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -2192,6 +2192,10 @@ static void save_TexImage3DEXT( GLcontext *ctx, GLenum target,
n[8].e = format;
n[9].e = type;
n[10].data = teximage;
+ if (teximage) {
+ /* this prevents gl_TexImage3D() from freeing the image */
+ teximage->RefCount = 1;
+ }
}
if (ctx->ExecuteFlag) {
(*ctx->Exec.TexImage3DEXT)( ctx, target, level, components, width,