CVS: source/src/Airports runwayprefs.cxx, 1.15, 1.16
James Turner <[email protected]> Wed, 7 Apr 2010 17:27:42 -0500
| Newsgroups | gmane.games.flightgear.cvc |
|---|---|
| Message-ID | <[email protected]> |
Update of /var/cvs/FlightGear-0.9/source/src/Airports
In directory baron.flightgear.org:/tmp/cvs-serv14003/src/Airports
Modified Files:
runwayprefs.cxx
Log Message:
Candidate fix for bug #118, crash with custom (scenery) airport data.
Index: runwayprefs.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Airports/runwayprefs.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- runwayprefs.cxx 16 Mar 2009 16:37:40 -0000 1.15
+++ runwayprefs.cxx 7 Apr 2010 22:27:39 -0000 1.16
@@ -225,7 +225,13 @@
validSelection = true;
for (int j = 0; j < activeRwys; j++)
{
- rwy = airport->getRunwayByIdent(rwyList[j].getRwyList(i));
+ string ident(rwyList[j].getRwyList(i));
+ if (!airport->hasRunwayWithIdent(ident)) {
+ SG_LOG(SG_GENERAL, SG_WARN, "no such runway:" << ident << " at " << airport->ident());
+ continue;
+ }
+
+ rwy = airport->getRunwayByIdent(ident);
//cerr << "Succes" << endl;
hdgDiff = fabs(windHeading - rwy->headingDeg());
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev