fixed nullpointer exception on death of clonk that is in no crew

Tobias Zwick 2010-12-08 16:34:20 +01:00
parent 8834f9ea54
commit f2018cc4e7
1 changed files with 6 additions and 2 deletions

View File

@ -138,8 +138,12 @@ public func Destruction()
public func OnCrewDisabled(object clonk)
{
// notify the hud and reorder
clonk->GetSelector()->CrewGone();
ReorderCrewSelectors(clonk);
var selector = clonk->GetSelector();
if(selector)
{
selector->CrewGone();
ReorderCrewSelectors(clonk);
}
}
public func OnCrewEnabled(object clonk)