mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-19 10:10:39 +02:00
loader/dri3: temporarily work around a crash when front is NULL
Commitc65bde7b1eintroduced a regression where under certain circumstances `front` may be NULL, thus leading to a crash. It's not currently known what exactly causes `front` to become NULL, nor we can revert the offending commit, because there had been too many unrelated changes that now depend on this commit. So until someone comes up with a proper fix, let's add a workaround so instead of crashing we just return from the function early. This commit was tested with the bug `8982` and helps with the crash with no other noticeable problems. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8982 Fixes:c65bde7b1e("frontend/dri: inline __DRIdrawable in dri_drawable, make __DRIdrawable opaque") Cc: mesa-stable Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23093> (cherry picked from commit275cf62e20)
This commit is contained in:
parent
2630f4b310
commit
eef0f7f1ea
2 changed files with 6 additions and 1 deletions
|
|
@ -1381,7 +1381,7 @@
|
|||
"description": "loader/dri3: temporarily work around a crash when front is NULL",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "c65bde7b1e03ccb3dcc53bd3d8c1e5560449ddb6"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -955,6 +955,11 @@ loader_dri3_wait_gl(struct loader_dri3_drawable *draw)
|
|||
return;
|
||||
|
||||
front = dri3_front_buffer(draw);
|
||||
/* TODO: `front` is not supposed to be NULL here, fix the actual bug
|
||||
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/8982
|
||||
*/
|
||||
if (!front)
|
||||
return;
|
||||
|
||||
/* In the psc->is_different_gpu case, we update the linear_buffer
|
||||
* before updating the real front.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue