diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-12-16 11:42:58 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-12-16 11:42:58 +0100 |
commit | 9082a83d6ac2b990db04752a991d97f8d18d4e34 (patch) | |
tree | 9b0dee091291ec5cda9c3f56194e86816760bcc9 /bin | |
parent | 57e6bc6e1b700c12552ed7b18817e9cfc53c834c (diff) | |
download | qtlocation-mapboxgl-9082a83d6ac2b990db04752a991d97f8d18d4e34.tar.gz |
don't assing nullptr to std::string
Diffstat (limited to 'bin')
-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 |