Check if we have a subparser before trying to use it

This commit is contained in:
Jeffrey Pfau 2014-07-23 22:57:44 -07:00
parent 6bbb1d5b43
commit 754d3f50ce
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ bool parseCommandArgs(struct StartupOptions* opts, int argc, char* const* argv,
"g"
#endif
;
if (subparser->extraOptions) {
if (subparser && subparser->extraOptions) {
// TODO: modularize options to subparsers
strncat(options, subparser->extraOptions, sizeof(options) - strlen(options) - 1);
}