From: Stephen Seo Date: Thu, 18 Jul 2024 06:49:22 +0000 (+0900) Subject: Fix error when checking with "-t" X-Git-Tag: 1.0~54 X-Git-Url: https://git.seodisparate.com/gitweb?a=commitdiff_plain;h=99e1a2d850d57f8c0601a5b9a8dd1ad6c17c3e53;p=SimpleArchiver Fix error when checking with "-t" --- diff --git a/src/archiver.c b/src/archiver.c index e50cc82..e098577 100644 --- a/src/archiver.c +++ b/src/archiver.c @@ -736,7 +736,8 @@ int simple_archiver_parse_archive_info(FILE *in_f, int do_extract, int skip = 0; __attribute__((cleanup(simple_archiver_hash_map_free))) SDArchiverHashMap *hash_map = NULL; - if (state->parsed->working_files && state->parsed->working_files[0] != NULL) { + if (state && state->parsed->working_files && + state->parsed->working_files[0] != NULL) { hash_map = simple_archiver_hash_map_init(); for (char **iter = state->parsed->working_files; *iter != NULL; ++iter) { int len = strlen(*iter) + 1;