mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 23:28:06 +02:00
state_tracker: fix dereference before null check
Coverity error CID 1528178 (#1 of 1): Dereference before null check (REVERSE_INULL) Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20893>
This commit is contained in:
parent
34e47b40e6
commit
c1a02c0138
1 changed files with 3 additions and 1 deletions
|
|
@ -2081,7 +2081,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
|
|||
GLubyte *map;
|
||||
unsigned dstz = texImage->Face + texImage->TexObject->Attrib.MinLayer;
|
||||
unsigned dst_level = 0;
|
||||
bool is_ms = dst->nr_samples > 1;
|
||||
bool is_ms;
|
||||
bool throttled = false;
|
||||
|
||||
st_flush_bitmap_cache(st);
|
||||
|
|
@ -2097,6 +2097,8 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
|
|||
if (!dst)
|
||||
goto fallback;
|
||||
|
||||
is_ms = dst->nr_samples > 1;
|
||||
|
||||
/* Try texture_subdata, which should be the fastest memcpy path. */
|
||||
if (pixels &&
|
||||
!unpack->BufferObj &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue