Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gwaldron/osgearth
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed May 16, 2024
2 parents 90525bb + b80b176 commit 67d367a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/osgEarth/MBTiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,14 @@ MBTiles::Driver::open(
{
if (!profileStr.empty())
{
// try to parse it as a JSON config
Config pconf;
pconf.fromJSON(profileStr);
profile = Profile::create(ProfileOptions(pconf));
// See if the profile string is JSON
if (profileStr.find("{") != std::string::npos)
{
// try to parse it as a JSON config
Config pconf;
pconf.fromJSON(profileStr);
profile = Profile::create(ProfileOptions(pconf));
}

// if that didn't work, try parsing it directly
if (!profile)
Expand Down

0 comments on commit 67d367a

Please sign in to comment.