diff --git a/src/osgEarth/MapNode.cpp b/src/osgEarth/MapNode.cpp index c08b17be14..b704c7bd86 100644 --- a/src/osgEarth/MapNode.cpp +++ b/src/osgEarth/MapNode.cpp @@ -315,10 +315,10 @@ MapNode::~MapNode() ModelLayerVector modelLayers; _map->getModelLayers( modelLayers ); - //Remove our model callback from any of the model layers in the map + //Remove our model callback from any of the model layers in the map for (osgEarth::ModelLayerVector::iterator itr = modelLayers.begin(); itr != modelLayers.end(); ++itr) { - itr->get()->removeCallback(_modelLayerCallback.get() ); + this->onModelLayerRemoved( itr->get() ); } }