The present invention relates to a composition and method for inhibiting the formation of naphthenate solids in a liquid hydrocarbon. The method includes contacting a composition including a rosin amine having a formula (I): or (II): where formula (AA): represents a single or double bond R1, R2 and R5 each independently represent H, alkyl, alkenyl or an alkynyl group each having between one and ten carbon atoms, —(R3O)nR4 wherein R3 is an alkyl group having 1 to 3 carbon atoms and R4 is H, alkyl, alkenyl or an alkynyl group each having between one and ten carbon atoms n is an integer between 5 and 50 X is a halide, sulphate, phosphate or acetate ion and a demulsifier intermediate with the liquid hydrocarbon.