summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index 6029231d74..8938b9cf01 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -550,6 +550,14 @@ int net_run_function(struct net_context *c, int argc, const char **argv,
const char *whoami, struct functable *table)
{
int i;
+
+ if (!table) {
+ d_fprintf(stderr, "Invalid command. Run \"%s\" for more details.\n",
+ whoami);
+ return 1;
+ }
+
+
if (argc != 0) {
for (i=0; table[i].funcname != NULL; i++) {
if (StrCaseCmp(argv[0], table[i].funcname) == 0)