I saw that no one has answered your question, so I thought I'd take a swing. However, the info below should not be considered legal advicee (or accurate in any way).
I always assumed that if you have an agreement with "ABC Company", your agreement remains in effect, even if the company is purchased by new owners. Because your agreement is not with the specific owners, but with the business entity "ABC Company". However, if a company reorganizes or goes in to bankruptcy- all bets are off.
I was just looking at a sample Supplier Agreement online. It added language that says "Any transfer, assignment, delegation or sublicense by a party without prior written consent is invalid. However, any party may assign this Agreement to a third party purchasing: (a) majority control of the party's equity shares; or (b) all or substantially all of either a party's assets or (ii) the assets of the party's relevant business unit under this Agreement."
This is all fairly confusing legal speak. If you have a lawyer, I would suggest you have a brief consultation with them regarding this. Also, you can find low cost legal contract help online from services such as Legal Zoom.