summaryrefslogtreecommitdiff
path: root/examples/c-captured/c-captured.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/c-captured/c-captured.c')
-rw-r--r--examples/c-captured/c-captured.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/c-captured/c-captured.c b/examples/c-captured/c-captured.c
index 8eac71ab3..e810f3e70 100644
--- a/examples/c-captured/c-captured.c
+++ b/examples/c-captured/c-captured.c
@@ -1354,7 +1354,10 @@ int main(int argc, char ** argv)
}
return 1;
}
- chmod(datadir, S_IRWXU);
+ if (datadir != NULL)
+ {
+ chmod(datadir, S_IRWXU);
+ }
if (nDPIsrvd_set_read_timeout(sock, 180, 0) != 0)
{