st/wgl: fix locking issue in stw_st_framebuffer_present_locked()
authorBrian Paul <brianp@vmware.com>
Mon, 9 Nov 2015 21:51:56 +0000 (14:51 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 11 Nov 2015 16:38:22 +0000 (09:38 -0700)
commiteb812921ac3a9b43e2cdd5dc65db34ba3fe9189b
tree6a81fe492be8ec27803f18f5be472392a1b9e8f4
parente42a29531ae3d5dedb72011da2947357dfa8715b
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>
src/gallium/state_trackers/wgl/stw_st.c