- if (cgit_repo->snapshots && cgit_query_page &&
- !strcmp(cgit_query_page, "snapshot")) {
- cgit_print_snapshot(item, cgit_query_sha1, "zip",
+ if (cgit_query_page) {
+ if (cgit_repo->snapshots && !strcmp(cgit_query_page, "snapshot")) {
+ cgit_print_snapshot(item, cgit_query_sha1, "zip",