forked from Mirrors/openclonk
Fix null pointer exceptions for lonely mosquitoes that aren't part of a swarm.
parent
d2bfdb9d4b
commit
2c77bc3ec5
|
@ -98,7 +98,7 @@ private func Death()
|
||||||
private func Destruction()
|
private func Destruction()
|
||||||
{
|
{
|
||||||
// Destruction of the master
|
// Destruction of the master
|
||||||
if (lib_swarm_helper->GetMaster() == this)
|
if (lib_swarm_helper) if (lib_swarm_helper->GetMaster() == this)
|
||||||
lib_swarm_helper->MakeNewMaster(lib_swarm_nextinline);
|
lib_swarm_helper->MakeNewMaster(lib_swarm_nextinline);
|
||||||
// Destruction of a slave
|
// Destruction of a slave
|
||||||
if(lib_swarm_previnline && lib_swarm_nextinline)
|
if(lib_swarm_previnline && lib_swarm_nextinline)
|
||||||
|
@ -116,7 +116,7 @@ private func PurgeLine()
|
||||||
|
|
||||||
private func MoveToTarget()
|
private func MoveToTarget()
|
||||||
{
|
{
|
||||||
if (lib_swarm_helper->GetMaster() == this)
|
if (!lib_swarm_helper || (lib_swarm_helper->GetMaster() == this))
|
||||||
return _inherited();
|
return _inherited();
|
||||||
|
|
||||||
var coordinates = { x=0, y=0 };
|
var coordinates = { x=0, y=0 };
|
||||||
|
|
Loading…
Reference in New Issue