mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
st/wgl: fix locking issue in stw_st_framebuffer_present_locked()
When stw_st_framebuffer_present_locked() is called, the stw_framebuffer's mutex will already be locked. Normally, the stw_framebuffer_present_locked() function calls stw_framebuffer_release() to unlock the mutex when it's done. But if for some reason the 'resource' pointer in stw_st_framebuffer_present_locked() is null, we'd return without unlocking the stw_framebuffer. This fixes that to avoid potential deadlocks. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
parent
e42a29531a
commit
eb812921ac
1 changed files with 3 additions and 0 deletions
|
|
@ -169,6 +169,9 @@ stw_st_framebuffer_present_locked(HDC hdc,
|
|||
if (resource) {
|
||||
stw_framebuffer_present_locked(hdc, stwfb->fb, resource);
|
||||
}
|
||||
else {
|
||||
stw_framebuffer_release(stwfb->fb);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue