diff options
-rw-r--r-- | src/render/Renderer.cpp | 4 | ||||
-rw-r--r-- | src/rw/VisibilityPlugins.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index d41f27e3..2c224677 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1396,6 +1396,10 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL void CRenderer::InsertEntityIntoList(CEntity *ent) { +#ifdef FIX_BUGS + if (!ent->m_rwObject) return; +#endif + #ifdef NEW_RENDERER // TODO: there are more flags being checked here if(gbNewRenderer && (ent->IsVehicle() || ent->IsPed())) diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index 32461d1c..051a6883 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -192,6 +192,10 @@ CVisibilityPlugins::InitAlphaEntityList(void) bool CVisibilityPlugins::InsertEntityIntoSortedList(CEntity *e, float dist) { +#ifdef FIX_BUGS + if (!e->m_rwObject) return true; +#endif + AlphaObjectInfo item; item.entity = e; item.sort = dist; |