mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-05 05:07:56 +03:00
Fix potential crash on sprite draw caused by null ref
This commit is contained in:
+3
-3
@@ -1613,7 +1613,7 @@ namespace spr {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
draw_param.texture[0] = tex_param[0].texture->tex;
|
||||
draw_param.texture[0] = tex_param[0].texture ? tex_param[0].texture->tex : 0;
|
||||
draw_param.sampler = rctx->sprite_samplers[0];
|
||||
|
||||
if (args.num_vertex) {
|
||||
@@ -1756,8 +1756,8 @@ namespace spr {
|
||||
return;
|
||||
}
|
||||
|
||||
draw_param.texture[0] = tex_param[0].texture->tex;
|
||||
draw_param.texture[1] = tex_param[1].texture->tex;
|
||||
draw_param.texture[0] = tex_param[0].texture ? tex_param[0].texture->tex : 0;
|
||||
draw_param.texture[1] = tex_param[1].texture ? tex_param[1].texture->tex : 0;
|
||||
draw_param.sampler = rctx->sprite_samplers[2];
|
||||
|
||||
sprite_draw_vertex spr_vtx[4] = {};
|
||||
|
||||
Reference in New Issue
Block a user