mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
move some code to avoid deref of NULL ptr
This commit is contained in:
parent
06036bc8c4
commit
a51d0e419a
1 changed files with 3 additions and 3 deletions
|
|
@ -147,10 +147,10 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc,
|
|||
|
||||
pipe_surface_reference(&tc->surface, ps);
|
||||
|
||||
if (!ps->map)
|
||||
pipe_surface_map(ps);
|
||||
|
||||
if (ps) {
|
||||
if (!ps->map)
|
||||
pipe_surface_map(ps);
|
||||
|
||||
tc->depth_stencil = (ps->format == PIPE_FORMAT_S8Z24_UNORM ||
|
||||
ps->format == PIPE_FORMAT_Z16_UNORM ||
|
||||
ps->format == PIPE_FORMAT_Z32_UNORM ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue