0

I use mapbox-gl-native (https://github.com/mapbox/mapbox-gl-native).

I have class, for example:

class MapboxGL {
public:
 explicit MapboxGL();
 ~MapboxGL();
}

In constructor MapboxGL() i tried to create an object and set access token:

mbgl::DefaultFileSource *fileS = new mbgl::DefaultFIleSource(nullptr);
fileS->setAccessToken("my token");

But after fileS->setAccessToken(..) i have error:

Segmentation fault in mbgl::DefaultFileSource::setAccessToken(..)

call stack: function: std::string::assign(std::string const&)()

mbgl::DefaultFileSource method:

void mbgl::DefaultFileSource::setAccessToken(const std::string& t) { accessToken = t; } 

What is the problem?

Steven Clark
  • 65
  • 1
  • 6

0 Answers0