Our system of government has built in safeguards against such a popular "mistake" by our citizens; some were built in to our Constitution by the Federalists so long ago, and party leaders had generally made their selections with just a few indicator primaries until 1968.  Constitutionally the Electoral College can overturn the popular vote, its never been done but occasionally an elector has voted their own mind and ignored the popular vote of their state.  As far as political parties are concerned the much discussed "super delegates" are the remnants of the system both parties had until 1968.  Prior to that all/most delegates made their decisions in "smoke filled back rooms" where the ability to win was the determining factor.  This archaic system had its successes, most notable was the selection of Franklin Roosevelt, John Kennedy, Dwight Eisenhower, and Theodore Roosevelt (as VP).