Please sign in to comment.
renderer: fix crash caused by func_explosive
* `func_explosive` assigned to nodraw brush + using `USE_SHADER` spawnflag, will lead to a crash on release builds. * When `RE_GetShaderFromModel` function is called for such brushmodel, it wont have any surfaces to work with, but due to no checks are made it keeps going on further, successfully surpassing the shader check on a release builds, and getting further to `surf->shader->lightmapIndex` would crash the game. * Simple surface count check helps to fix the issue.
- Loading branch information...
Showing with 12 additions and 2 deletions.