summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/odb.c b/src/odb.c
index 890e6e2f8..0c8cf84f0 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -900,11 +900,12 @@ int git_odb__read_header_or_object(
int error = GIT_ENOTFOUND;
git_odb_object *object;
- assert(db && id && out && len_p && type_p);
+ assert(db && id && out && len_p);
if ((object = git_cache_get_raw(odb_cache(db), id)) != NULL) {
*len_p = object->cached.size;
- *type_p = object->cached.type;
+ if (type_p)
+ *type_p = object->cached.type;
*out = object;
return 0;
}