Corrosive amine salts in hydrocarbon streams such as desalted crude oil streams can be prevented or avoided by adding certain amine scavenging chemicals to the streams. Suitable amine scavengers include, but are not necessarily limited to, carboxylic anhydrides and copolymers of carboxylic anhydrides, aromatic anhydrides, isocyanates, polyisocyanates, and epoxides. The non-corrosive reaction products of the amines and/or ammonia with these scavengers are preferably oil-soluble, non-basic and thermally stable. The amine scavengers bind up and react with the amines and/or ammonia to keep them from reacting with materials such as acids (e.g. HCl) to form corrosive amine salts.