summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/utils/smbcontrol.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 8255a41c96..a2c65e916c 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -1335,11 +1335,13 @@ int main(int argc, const char **argv)
argv = (const char **)poptGetArgs(pc);
argc = 0;
- while (argv[argc] != NULL) {
- argc++;
+ if (argv != NULL) {
+ while (argv[argc] != NULL) {
+ argc++;
+ }
}
- if (argc == 1)
+ if (argc <= 1)
usage(pc);
lp_load(dyn_CONFIGFILE,False,False,False,True);