common: Fix a segfault when backend provides no cmdline handler.

This commit is contained in:
Solomon Peachy 2013-07-18 23:12:40 -04:00
parent 93de75e813
commit 32da54ee36

View file

@ -27,7 +27,7 @@
#include "backend_common.h"
#define BACKEND_VERSION "0.09"
#define BACKEND_VERSION "0.10"
#ifndef URI_PREFIX
#define URI_PREFIX "gutenprint+usb"
#endif
@ -518,7 +518,7 @@ int main (int argc, char **argv)
exit(1);
}
if (backend->cmdline_arg(NULL, 0, argv[1], argv[2])) {
if (backend->cmdline_arg && backend->cmdline_arg(NULL, 0, argv[1], argv[2])) {
query_only = 1;
}