mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 19:01:50 +00:00
Fix dereferncing Broly null pointer
This commit is contained in:
parent
c8827c18a2
commit
98c4b34530
2 changed files with 9 additions and 2 deletions
|
|
@ -875,8 +875,10 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
|
||||||
attackerPlayer->flashing = 0;
|
attackerPlayer->flashing = 0;
|
||||||
|
|
||||||
// Localized broly for a local event.
|
// Localized broly for a local event.
|
||||||
mobj_t *broly = Obj_SpawnBrolyKi(victim, victimHitlag);
|
if (mobj_t *broly = Obj_SpawnBrolyKi(victim, victimHitlag))
|
||||||
broly->extravalue2 = 16*mapobjectscale;
|
{
|
||||||
|
broly->extravalue2 = 16*mapobjectscale;
|
||||||
|
}
|
||||||
|
|
||||||
P_PlayVictorySound(victim);
|
P_PlayVictorySound(victim);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,11 @@ Obj_SpawnBrolyKi
|
||||||
{
|
{
|
||||||
Broly* x = Broly::spawn<Broly>(static_cast<Mobj*>(source), duration, {64 * mapobjectscale, 0});
|
Broly* x = Broly::spawn<Broly>(static_cast<Mobj*>(source), duration, {64 * mapobjectscale, 0});
|
||||||
|
|
||||||
|
if (!x)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
x->colorized = true;
|
x->colorized = true;
|
||||||
x->color = source->color;
|
x->color = source->color;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue