diff options
Diffstat (limited to 'bin/render.cpp')
-rw-r--r-- | bin/render.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/render.cpp b/bin/render.cpp index 01d32b6db9..feeb4fe3f4 100644 --- a/bin/render.cpp +++ b/bin/render.cpp @@ -78,7 +78,10 @@ int main(int argc, char *argv[]) { // Try to load the token from the environment. if (!token.size()) { - token = getenv("MAPBOX_ACCESS_TOKEN"); + const char *token_ptr = getenv("MAPBOX_ACCESS_TOKEN"); + if (token_ptr) { + token = token_ptr; + } } // Set access token if present |