File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
GeneralsMD/Code/GameEngine/Source/Common/RTS
Generals/Code/GameEngine/Source/Common/RTS Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2430,8 +2430,10 @@ void Team::killTeam(void)
2430
2430
2431
2431
evacuateTeam ();
2432
2432
2433
+ // TheSuperHackers @bugfix Mauller 20/07/2025 the neutral player has no player template so we need to check for a null template
2434
+ const PlayerTemplate* playerTemplate = getControllingPlayer ()->getPlayerTemplate ();
2433
2435
// beacons are effectively dead, so we need to destroy via a non-kill() method
2434
- const ThingTemplate * beaconTemplate = TheThingFactory->findTemplate ( getControllingPlayer ()-> getPlayerTemplate ()-> getBeaconTemplate () );
2436
+ const ThingTemplate* beaconTemplate = playerTemplate ? TheThingFactory->findTemplate ( playerTemplate-> getBeaconTemplate () ) : NULL ;
2435
2437
2436
2438
// now find objects to kill
2437
2439
for (DLINK_ITERATOR<Object> iter = iterate_TeamMemberList (); !iter.done (); iter.advance ()) {
Original file line number Diff line number Diff line change @@ -2436,8 +2436,10 @@ void Team::killTeam(void)
2436
2436
2437
2437
evacuateTeam ();
2438
2438
2439
+ // TheSuperHackers @bugfix Mauller 20/07/2025 the neutral player has no player template so we need to check for a null template
2440
+ const PlayerTemplate* playerTemplate = getControllingPlayer ()->getPlayerTemplate ();
2439
2441
// beacons are effectively dead, so we need to destroy via a non-kill() method
2440
- const ThingTemplate * beaconTemplate = TheThingFactory->findTemplate ( getControllingPlayer ()-> getPlayerTemplate ()-> getBeaconTemplate () );
2442
+ const ThingTemplate* beaconTemplate = playerTemplate ? TheThingFactory->findTemplate ( playerTemplate-> getBeaconTemplate () ) : NULL ;
2441
2443
2442
2444
// now find objects to kill
2443
2445
for (DLINK_ITERATOR<Object> iter = iterate_TeamMemberList (); !iter.done (); iter.advance ()) {
You can’t perform that action at this time.
0 commit comments