diff options
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commit.c b/src/commit.c index bbb0d9be..1b30c5d6 100644 --- a/src/commit.c +++ b/src/commit.c @@ -40,6 +40,9 @@ git_commit *git_commit_lookup(git_revpool *pool, const git_oid *id) git_obj commit_obj; git_commit *commit = NULL; + if (pool == NULL || pool->db == NULL) + return NULL; + /* * TODO: check if the commit is already cached in the * revpool instead of loading it from the odb |