summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-05-30 16:29:18 +0200
committerMarek Olšák <[email protected]>2016-05-31 16:43:34 +0200
commit8a10192b4b2435577bde1227c06166029b581398 (patch)
tree2ce7acb4c5b5fce656afcd245216618c9d57c972 /src
parentfc4896e686f79893d6496c7a792a6c72cb3759c1 (diff)
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 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index fa5baa3517b..bf47c1cf365 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -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