diff options
author | Manuel Reimer <manuel.reimer@gmx.de> | 2016-10-29 17:51:45 +0200 |
---|---|---|
committer | Manuel Reimer <manuel.reimer@gmx.de> | 2016-10-29 17:51:45 +0200 |
commit | e52e140965a9b93aee20f884db98b8ad903e19c0 (patch) | |
tree | 9ea7aa82f057e4b692b918d1c3fc9954a345f311 /tools/skintest/skintest.c | |
parent | 32effce985e7e9df08af7c80da35fec572648c4a (diff) | |
download | graphlcd-base-e52e140965a9b93aee20f884db98b8ad903e19c0.tar.gz graphlcd-base-e52e140965a9b93aee20f884db98b8ad903e19c0.tar.bz2 |
Fix segfault if skintest is used without "-s" parameter
Diffstat (limited to 'tools/skintest/skintest.c')
-rw-r--r-- | tools/skintest/skintest.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/skintest/skintest.c b/tools/skintest/skintest.c index 747dd91..0cb9b23 100644 --- a/tools/skintest/skintest.c +++ b/tools/skintest/skintest.c @@ -121,6 +121,12 @@ int main(int argc, char ** argv) fprintf(stdout, "WARNING: No config file specified, using default (%s).\n", configName.c_str()); } + if (skinFileName.length() == 0) + { + fprintf(stderr, "ERROR: Skin file path has to be set using the '-s' parameter on command line!\n"); + return 1; + } + if (GLCD::Config.Load(configName) == false) { fprintf(stderr, "Error loading config file!\n"); |