Changeset 4654 for geovis


Ignore:
Timestamp:
Oct 17, 2014 8:26:28 PM (5 years ago)
Author:
ldelgass
Message:

Crash fix for commands sent before map is set up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • geovis/trunk/Renderer.cpp

    r4648 r4654  
    13311331void Renderer::updateBoxSelection(int x, int y)
    13321332{
    1333     osgEarth::Annotation::FeatureNode *node = _selectionBox.get();
    13341333    double nlat, nlong;
    13351334    if (!mouseToLatLong(x, y, &nlat, &nlong)) {
     
    13621361        latMax = _anchorLat;
    13631362    }
     1363    osgEarth::Annotation::FeatureNode *node = _selectionBox.get();
    13641364    osgEarth::Symbology::Geometry *geom = node->getFeature()->getGeometry();
    13651365    (*geom)[0] = osg::Vec3d(longMax, latMin, 0);
     
    14661466void Renderer::hoverPlaceNode(int x, int y, bool invertY)
    14671467{
     1468    if (!_placeNodes.valid()) {
     1469        ERROR("No place nodes");
     1470        return;
     1471    }
    14681472    osgEarth::Picker picker(_viewer.get(), _placeNodes.get());
    14691473    osgEarth::Picker::Hits hits;
     
    15071511void Renderer::deletePlaceNode(int x, int y, bool invertY)
    15081512{
     1513    if (!_placeNodes.valid()) {
     1514        ERROR("No place nodes");
     1515        return;
     1516    }
    15091517    osgEarth::Picker picker(_viewer.get(), _placeNodes.get());
    15101518    osgEarth::Picker::Hits hits;
Note: See TracChangeset for help on using the changeset viewer.