Imported Upstream version 2.27.0
[platform/upstream/git.git] / list-objects-filter.c
index 1e8d4e7..0a3ef3c 100644 (file)
@@ -663,6 +663,9 @@ struct filter *list_objects_filter__init(
 
        assert((sizeof(s_filters) / sizeof(s_filters[0])) == LOFC__COUNT);
 
+       if (!filter_options)
+               return NULL;
+
        if (filter_options->choice >= LOFC__COUNT)
                BUG("invalid list-objects filter choice: %d",
                    filter_options->choice);