Commit f2f487c0 authored by Alexey Hohlov's avatar Alexey Hohlov
Browse files

Проверка указателя перед обращением

parent 3009b02c
......@@ -16,6 +16,8 @@ void IProjectile::CreateProjectile(string type, CVector pos, float an, uint8_t p
CFabric& fabric = CFabric::GetFabric();
IProjectile* bullet = (IProjectile*)fabric.CreateDynamic(type, pos);
bullet->angle(an);
bullet->pid(pid);
if (bullet) {
bullet->angle(an);
bullet->pid(pid);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment