mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
wgl: Check for null before dereferencing ctx in swap
Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28211>
This commit is contained in:
parent
df638c023d
commit
63366781aa
1 changed files with 2 additions and 1 deletions
|
|
@ -733,7 +733,8 @@ stw_framebuffer_swap_locked(HDC hdc, struct stw_framebuffer *fb)
|
|||
struct stw_context *ctx = stw_current_context();
|
||||
if (!(fb->pfi->pfd.dwFlags & PFD_DOUBLEBUFFER)) {
|
||||
stw_framebuffer_unlock(fb);
|
||||
stw_st_flush(ctx->st, fb->drawable, ST_FLUSH_END_OF_FRAME | ST_FLUSH_FRONT);
|
||||
if (ctx)
|
||||
stw_st_flush(ctx->st, fb->drawable, ST_FLUSH_END_OF_FRAME | ST_FLUSH_FRONT);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue