(svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation.

This commit is contained in:
frosch
2010-06-05 12:16:12 +00:00
parent 406c2a9865
commit 1d3adb2b66
17 changed files with 62 additions and 44 deletions

View File

@@ -1204,7 +1204,7 @@ void HandleMissingAircraftOrders(Aircraft *v)
*/
const Station *st = GetTargetAirportIfValid(v);
if (st == NULL) {
Backup<CompanyByte> cur_company(_current_company, v->owner);
Backup<CompanyByte> cur_company(_current_company, v->owner, FILE_LINE);
CommandCost ret = DoCommand(v->tile, v->index, 0, DC_EXEC, CMD_SEND_AIRCRAFT_TO_HANGAR);
cur_company.Restore();
@@ -1510,7 +1510,7 @@ static void AircraftEventHandler_HeliTakeOff(Aircraft *v, const AirportFTAClass
/* Send the helicopter to a hangar if needed for replacement */
if (v->NeedsAutomaticServicing()) {
Backup<CompanyByte> cur_company(_current_company, v->owner);
Backup<CompanyByte> cur_company(_current_company, v->owner, FILE_LINE);
DoCommand(v->tile, v->index, DEPOT_SERVICE | DEPOT_LOCATE_HANGAR, DC_EXEC, CMD_SEND_AIRCRAFT_TO_HANGAR);
cur_company.Restore();
}
@@ -1562,7 +1562,7 @@ static void AircraftEventHandler_Landing(Aircraft *v, const AirportFTAClass *apc
/* check if the aircraft needs to be replaced or renewed and send it to a hangar if needed */
if (v->NeedsAutomaticServicing()) {
Backup<CompanyByte> cur_company(_current_company, v->owner);
Backup<CompanyByte> cur_company(_current_company, v->owner, FILE_LINE);
DoCommand(v->tile, v->index, DEPOT_SERVICE, DC_EXEC, CMD_SEND_AIRCRAFT_TO_HANGAR);
cur_company.Restore();
}