st/wgl: add a lock assertion in stw_framebuffer_from_hwnd_locked()
authorBrian Paul <brianp@vmware.com>
Tue, 10 Nov 2015 21:49:01 +0000 (14:49 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 12 Nov 2015 18:21:25 +0000 (11:21 -0700)
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/state_trackers/wgl/stw_framebuffer.c

index 7d7248e003097cfe43c4f1db02ecd1b25b9e7f8a..b49bc22e21f5e43eda46b36002357dd1d254ce9a 100644 (file)
@@ -55,6 +55,7 @@ stw_framebuffer_from_hwnd_locked(HWND hwnd)
    for (fb = stw_dev->fb_head; fb != NULL; fb = fb->next)
       if (fb->hWnd == hwnd) {
          stw_framebuffer_lock(fb);
+         assert(fb->mutex.RecursionCount == 1);
          return fb;
       }