diff --git a/dlls/monster/CXenPLight.cpp b/dlls/monster/CXenPLight.cpp index bc086b3e..2acd780b 100644 --- a/dlls/monster/CXenPLight.cpp +++ b/dlls/monster/CXenPLight.cpp @@ -57,8 +57,11 @@ void CXenPLight::Spawn(void) return; m_pGlow = CSprite::SpriteCreate(XEN_PLANT_GLOW_SPRITE, pev->origin + Vector(0, 0, (pev->mins.z + pev->maxs.z) * 0.5), FALSE); - m_pGlow->SetTransparency(kRenderGlow, pev->rendercolor.x, pev->rendercolor.y, pev->rendercolor.z, pev->renderamt, pev->renderfx); - m_pGlow->SetAttachment(edict(), 1); + if (m_pGlow) + { + m_pGlow->SetTransparency(kRenderGlow, pev->rendercolor.x, pev->rendercolor.y, pev->rendercolor.z, pev->renderamt, pev->renderfx); + m_pGlow->SetAttachment(edict(), 1); + } } diff --git a/dlls/monster/CXenTree.cpp b/dlls/monster/CXenTree.cpp index b0f0e782..0c902629 100644 --- a/dlls/monster/CXenTree.cpp +++ b/dlls/monster/CXenTree.cpp @@ -96,7 +96,8 @@ void CXenTree::Spawn(void) triggerPosition = pev->origin + (triggerPosition * 64); // Create the trigger m_pTrigger = CXenTreeTrigger::TriggerCreate(edict(), triggerPosition); - UTIL_SetSize(m_pTrigger->pev, Vector(-24, -24, 0), Vector(24, 24, 128)); + if (m_pTrigger) + UTIL_SetSize(m_pTrigger->pev, Vector(-24, -24, 0), Vector(24, 24, 128)); } const char* CXenTree::pAttackHitSounds[] =