diff options
author | Brian Paul <[email protected]> | 2015-11-09 17:25:22 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-11-11 09:38:22 -0700 |
commit | 9870a5c6c9664d34432ba551ab9dce6ae79beaa4 (patch) | |
tree | 573a48e915e9c09a8655de8f8aedcd5c402666cf | |
parent | 004ed6f4a9eb50d7a5e79040b036beff63a3440b (diff) |
st/wgl: clarify code in stw_framebuffer_from_hwnd_locked()
Just a minor code change to make it obvious that NULL is returned when
we don't find the given HWND.
Reviewed-by: Sinclair Yeh <[email protected]>
Reviewed-by: Charmaine Lee <[email protected]>
Reviewed-by: José Fonseca <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_framebuffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c index 95d892add34..09dede8d2a1 100644 --- a/src/gallium/state_trackers/wgl/stw_framebuffer.c +++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c @@ -55,10 +55,10 @@ stw_framebuffer_from_hwnd_locked(HWND hwnd) for (fb = stw_dev->fb_head; fb != NULL; fb = fb->next) if (fb->hWnd == hwnd) { pipe_mutex_lock(fb->mutex); - break; + return fb; } - return fb; + return NULL; } |