Corporations Code § 9251
ARTICLE 5. Investments
Nothing in Section 9250 shall abrogate or restrict the power of a court in proper cases to direct or permit a corporation to deviate from the terms of a trust or agreement regarding the making or retention of investments.