tree-diff: don't access hash of NULL object_id pointer
[gitweb.git] / builtin / am.c
index 0f63dcab1610f111f19b513eea47089132c1c702..d9fdddac4affa80ac970e8084331f2ab1289f375 100644 (file)
@@ -563,7 +563,7 @@ static int copy_notes_for_rebase(const struct am_state *state)
                        goto finish;
                }
 
-               if (copy_note_for_rewrite(c, from_obj.hash, to_obj.hash))
+               if (copy_note_for_rewrite(c, &from_obj, &to_obj))
                        ret = error(_("Failed to copy notes from '%s' to '%s'"),
                                        oid_to_hex(&from_obj), oid_to_hex(&to_obj));
        }