Mercurial > hg > openttd
diff src/vehicle.cpp @ 15292:e2c62d70dfcf draft
(svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation.
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 05 Jun 2010 12:16:12 +0000 (2010-06-05) |
parents | 4e1862aebea2 |
children | ff08f0eb701d |
line wrap: on
line diff
--- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -773,7 +773,7 @@ } } - Backup<CompanyByte> cur_company(_current_company); + Backup<CompanyByte> cur_company(_current_company, FILE_LINE); for (AutoreplaceMap::iterator it = _vehicles_to_autoreplace.Begin(); it != _vehicles_to_autoreplace.End(); it++) { v = it->first; /* Autoreplace needs the current company set as the vehicle owner */ @@ -1112,7 +1112,7 @@ } if (t.IsRefit()) { - Backup<CompanyByte> cur_company(_current_company, v->owner); + Backup<CompanyByte> cur_company(_current_company, v->owner, FILE_LINE); CommandCost cost = DoCommand(v->tile, v->index, t.GetRefitCargo() | t.GetRefitSubtype() << 8, DC_EXEC, GetCmdRefitVeh(v)); cur_company.Restore();