mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
mesa: fix crash in driver_RenderTexture_is_safe
This just fixed the crash with the apitrace in bug report. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95246 Cc: 11.1 11.2 12.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
fc4896e686
commit
8a10192b4b
1 changed files with 2 additions and 1 deletions
|
|
@ -389,7 +389,8 @@ driver_RenderTexture_is_safe(const struct gl_renderbuffer_attachment *att)
|
|||
const struct gl_texture_image *const texImage =
|
||||
att->Texture->Image[att->CubeMapFace][att->TextureLevel];
|
||||
|
||||
if (texImage->Width == 0 || texImage->Height == 0 || texImage->Depth == 0)
|
||||
if (!texImage ||
|
||||
texImage->Width == 0 || texImage->Height == 0 || texImage->Depth == 0)
|
||||
return false;
|
||||
|
||||
if ((texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue