mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-30 05:10:38 +02:00
sch2fig/main.c (main): fail if there is no gfx driver name
This commit is contained in:
parent
c6713dfbd8
commit
f8f497c61a
@ -95,6 +95,8 @@ int main(int argc, char *const *argv)
|
|||||||
gfx_argv[1] = NULL;
|
gfx_argv[1] = NULL;
|
||||||
} else {
|
} else {
|
||||||
gfx_argc = argc - dashdash - 1;
|
gfx_argc = argc - dashdash - 1;
|
||||||
|
if (!gfx_argc)
|
||||||
|
usage(*argv);
|
||||||
gfx_argv = alloc_size(sizeof(const char *) * (gfx_argc + 1));
|
gfx_argv = alloc_size(sizeof(const char *) * (gfx_argc + 1));
|
||||||
memcpy(gfx_argv, argv + dashdash + 1,
|
memcpy(gfx_argv, argv + dashdash + 1,
|
||||||
sizeof(const char *) * (gfx_argc + 1));
|
sizeof(const char *) * (gfx_argc + 1));
|
||||||
|
Loading…
Reference in New Issue
Block a user