summaryrefslogtreecommitdiff
path: root/linux/main.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-06-02 12:01:33 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-06-02 12:01:33 +0200
commit15c12701e3dacb40aa3a1bead587e9f8fb6433d6 (patch)
treeeac592e326f157d83c62f9491c3af24f818b0a99 /linux/main.cpp
parent6bbac8559f385043f59af25dd6517a5ae080498d (diff)
downloadqtlocation-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.cpp4
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();