From 5a2fa7f5639aed99e72e8093a6828e11e411d90d Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 30 Apr 2008 16:36:54 +0200 Subject: [PATCH] Fix a segfault if we don't find an exlcude list. --- src/csync_exclude.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/csync_exclude.c b/src/csync_exclude.c index eccf5a66b..96eaefe7c 100644 --- a/src/csync_exclude.c +++ b/src/csync_exclude.c @@ -104,6 +104,10 @@ void csync_exclude_destroy(CSYNC *ctx) { int csync_excluded(CSYNC *ctx, const char *path) { size_t i; + if (ctx->excludes == NULL) { + return 0; + } + if (ctx->excludes->count) { for (i = 0; i < ctx->excludes->count; i++) { if (fnmatch(ctx->excludes->vector[i], path, 0) == 0) {