]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/groundradar.cxx
Proposed fix for #251: Waypoint handling
[flightgear.git] / src / Instrumentation / groundradar.cxx
index 937fa2614b4858758c068307b31055a4185c5d81..ffa2e1fc945881d6f4278c49b4aa22f425e3b573 100644 (file)
@@ -20,6 +20,8 @@
 #  include "config.h"
 #endif
 
+#include <cassert>
+
 #include <osg/Node>
 #include <osg/Geode>
 #include <osg/Geometry>
@@ -197,7 +199,7 @@ osg::Geometry *GroundRadar::addPavementGeometry(const FGPavement* aPavement, dou
   geo_inverse_wgs_84(aTowerLat, aTowerLon, (*loopBegin)->mPos.getLatitudeDeg(), (*loopBegin)->mPos.getLongitudeDeg(), &az1, &az2, &dist_m);
   osg::Vec3 p1 = fromPolar(az1, dist_m * aScale) + osg::Vec3(TextureHalfSize, TextureHalfSize, 0);
   pts->push_back( p1 );
-  polygon->setVertexArray( pts );
+  polygon->setVertexArray( pts.get() );
 
   polygon->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::POLYGON, 0, pts->size() ) );