CVS: source/src/GUI MapWidget.cxx,1.1,1.2

James Turner <[email protected]> Wed, 21 Apr 2010 11:18:35 -0500
Newsgroups gmane.games.flightgear.cvc
Message-ID <[email protected]>
Update of /var/cvs/FlightGear-0.9/source/src/GUI
In directory baron.flightgear.org:/tmp/cvs-serv26213/src/GUI

Modified Files:
	MapWidget.cxx 
Log Message:
MapWidget: fix a crash on uninitialized.


Index: MapWidget.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/GUI/MapWidget.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MapWidget.cxx	27 Mar 2010 16:58:00 -0000	1.1
+++ MapWidget.cxx	21 Apr 2010 16:18:31 -0000	1.2
@@ -532,18 +532,18 @@
   double julianDate = globals->get_time_params()->getJD();
   _magVar->update(_projectionCenter, julianDate);
 
-  SGGeod topLeft = unproject(SGVec2d(_width/2, _height/2));
-  // compute draw range, including a fudge factor for ILSs and other 'long'
-  // symbols
-  _drawRangeNm = SGGeodesy::distanceNm(_projectionCenter, topLeft) + 10.0;
-
   bool aircraftUp = _root->getBoolValue("aircraft-heading-up");
   if (aircraftUp) {
     _upHeading = fgGetDouble("/orientation/heading-deg");
   } else {
     _upHeading = 0.0;
   }
-    
+
+  SGGeod topLeft = unproject(SGVec2d(_width/2, _height/2));
+  // compute draw range, including a fudge factor for ILSs and other 'long'
+  // symbols
+  _drawRangeNm = SGGeodesy::distanceNm(_projectionCenter, topLeft) + 10.0;
+
 // drawing operations
   GLint sx = (int) abox.min[0],
     sy = (int) abox.min[1];


------------------------------------------------------------------------------