diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-06-02 12:01:33 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-06-02 12:01:33 +0200 |
commit | 15c12701e3dacb40aa3a1bead587e9f8fb6433d6 (patch) | |
tree | eac592e326f157d83c62f9491c3af24f818b0a99 /linux/main.cpp | |
parent | 6bbac8559f385043f59af25dd6517a5ae080498d (diff) | |
download | qtlocation-mapboxgl-15c12701e3dacb40aa3a1bead587e9f8fb6433d6.tar.gz |
error early when it can't read the style file
Diffstat (limited to 'linux/main.cpp')
-rw-r--r-- | linux/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/main.cpp b/linux/main.cpp index bee52d9014..ec4dd49571 100644 --- a/linux/main.cpp +++ b/linux/main.cpp @@ -44,6 +44,10 @@ int main(int argc, char *argv[]) { // read default stylesheet from disk std::ifstream stylefile("./style.min.js"); + if (!stylefile.good()) { + fprintf(stder, "Cannot read style file\n"); + return 1; + } std::stringstream stylejson; stylejson << stylefile.rdbuf(); |