From 15c12701e3dacb40aa3a1bead587e9f8fb6433d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Mon, 2 Jun 2014 12:01:33 +0200 Subject: [PATCH] error early when it can't read the style file --- linux/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux/main.cpp b/linux/main.cpp index bee52d901..ec4dd4957 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();