In all cases where property has been conveyed by deed, or devised by will, upon contingent remainder, executory devise, or other limitations, where a judgment of a superior court has been rendered authorizing the sale or mortgaging, including execution of deeds of trust, of such property discharged of such contingent remainder, executory devise, or other limitations in actions or special proceedings where all persons in being who would have taken such property if the contingency had then happened were parties, such judgment shall be valid and binding upon the parties thereto and upon all other persons not then in being or whose estates had not been vested: Provided, that nothing herein contained shall be construed to impair or destroy any vested right or estate.
N.C. Gen. Stat. § 41-12