mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
unreference old framebuffer, if needed, in _mesa_reference_framebuffer()
This commit is contained in:
parent
955906aa64
commit
1a6baf092b
1 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue