st/mesa: check ureg_create() retval in create_pbo_upload_vs()
This avoids a possible NULL dereference because ureg_create() might return a NULL pointer. Spotted by coverity. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
@@ -1132,6 +1132,8 @@ create_pbo_upload_vs(struct st_context *st)
|
||||
struct ureg_dst out_layer;
|
||||
|
||||
ureg = ureg_create(TGSI_PROCESSOR_VERTEX);
|
||||
if (!ureg)
|
||||
return NULL;
|
||||
|
||||
in_pos = ureg_DECL_vs_input(ureg, TGSI_SEMANTIC_POSITION);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user