diff --git a/xar/src/xar.c b/xar/src/xar.c index f045f39..bf66ea9 100644 --- a/xar/src/xar.c +++ b/xar/src/xar.c @@ -1388,7 +1388,7 @@ static int extract(const char *filename, int arglen, char *args[]) { const char *prop = NULL; int deferred = 0; if( xar_prop_get(f, "type", &prop) == 0 ) { - if( strcmp(prop, "directory") == 0 ) { + if( prop != NULL && strcmp(prop, "directory") == 0 ) { if (!ToStdout) { struct lnode *tmpl = calloc(sizeof(struct lnode),1); tmpl->str = (char *)f;