summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--revision.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index 351fb5b9f1..f6caef0672 100644
--- a/revision.c
+++ b/revision.c
@@ -135,10 +135,12 @@ static void mark_tree_contents_uninteresting(struct tree *tree)
void mark_tree_uninteresting(struct tree *tree)
{
- struct object *obj = &tree->object;
+ struct object *obj;
if (!tree)
return;
+
+ obj = &tree->object;
if (obj->flags & UNINTERESTING)
return;
obj->flags |= UNINTERESTING;