diff options
author | David Robillard <d@drobilla.net> | 2017-04-12 19:49:29 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-04-12 20:22:40 +0200 |
commit | 5ead7905fed20333337fa82509e157499c71658a (patch) | |
tree | b1ee1011239e018a8d111887b732e8eeaa9a7b78 /src | |
parent | 51f52ca7b6dacf698741fdb1e9afbb645777d6d0 (diff) | |
download | ingen-5ead7905fed20333337fa82509e157499c71658a.tar.gz ingen-5ead7905fed20333337fa82509e157499c71658a.tar.bz2 ingen-5ead7905fed20333337fa82509e157499c71658a.zip |
Ensure thread count is sane
Diffstat (limited to 'src')
-rw-r--r-- | src/ingen/ingen.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ingen/ingen.cpp b/src/ingen/ingen.cpp index 1cbb60e1..1932b793 100644 --- a/src/ingen/ingen.cpp +++ b/src/ingen/ingen.cpp @@ -114,6 +114,11 @@ main(int argc, char** argv) // Run engine SPtr<Interface> engine_interface; if (conf.option("engine").get<int32_t>()) { + if (world->conf().option("threads").get<int32_t>() < 1) { + cerr << "ingen: error: threads must be > 0" << endl; + return EXIT_FAILURE; + } + ingen_try(world->load_module("server"), "Failed to load server module"); ingen_try(bool(world->engine()), "Unable to create engine"); |