Skip to content

Commit

Permalink
Add sanity check in R_StudioGetTextureHeader just in case of game cra…
Browse files Browse the repository at this point in the history
…sh when T.mdl is missing.
  • Loading branch information
hzqst committed Apr 1, 2024
1 parent c6085da commit 7253669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Plugins/Renderer/gl_studio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ studiohdr_t* R_StudioGetTextureHeader(studio_vbo_t* VBOData)

return (*pstudiohdr);
#else
if ((*pstudiohdr)->textureindex == 0)
if ((*pstudiohdr)->textureindex == 0 && VBOData->TextureModel)
{
auto ptexturehdr = (studiohdr_t*)IEngineStudio.Mod_Extradata(VBOData->TextureModel);

Expand Down

0 comments on commit 7253669

Please sign in to comment.