projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
955906a
)
unreference old framebuffer, if needed, in _mesa_reference_framebuffer()
author
Brian
<brian@yutani.localnet.net>
Tue, 6 Mar 2007 23:26:02 +0000
(16:26 -0700)
committer
Brian
<brian@yutani.localnet.net>
Tue, 6 Mar 2007 23:26:02 +0000
(16:26 -0700)
src/mesa/main/framebuffer.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/framebuffer.c
b/src/mesa/main/framebuffer.c
index c97d2f0077bfc8ef001b927705ce91ef9d8e09fd..3136a950e08440e6cfc78afa0df71a4c4e5bf0d2 100644
(file)
--- a/
src/mesa/main/framebuffer.c
+++ b/
src/mesa/main/framebuffer.c
@@
-253,6
+253,13
@@
_mesa_reference_framebuffer(struct gl_framebuffer **ptr,
struct gl_framebuffer *fb)
{
assert(ptr);
+ if (*ptr == fb) {
+ /* no change */
+ return;
+ }
+ if (*ptr) {
+ _mesa_unreference_framebuffer(ptr);
+ }
assert(!*ptr);
assert(fb);
_glthread_LOCK_MUTEX(fb->Mutex);