diff --git a/src/parsing/parse.c b/src/parsing/parse.c index 7394c5f..b09ec4f 100644 --- a/src/parsing/parse.c +++ b/src/parsing/parse.c @@ -89,9 +89,11 @@ void parse(void *arg) { return; } - pthread_mutex_lock(&ScanCtx.copy_table_mu); - incremental_mark_file(ScanCtx.new_table, doc->path_md5); - pthread_mutex_unlock(&ScanCtx.copy_table_mu); + if (ScanCtx.new_table != NULL) { + pthread_mutex_lock(&ScanCtx.copy_table_mu); + incremental_mark_file(ScanCtx.new_table, doc->path_md5); + pthread_mutex_unlock(&ScanCtx.copy_table_mu); + } char *buf[MAGIC_BUF_SIZE];