diff --git a/src/CRE/sprite.cpp b/src/CRE/sprite.cpp index 0b0084ba..8a6e4a23 100644 --- a/src/CRE/sprite.cpp +++ b/src/CRE/sprite.cpp @@ -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] = {};