Actually Pence would not automatically become the candidate. The members of the RNC (the establishment Republicans 168 memebers) could decide to nominate someone totally different. I could see Jeb easily coming out of that with a nomination.
Rule 9 of the Rules of the Republican Party—which were last approved and amended at the Republican National Convention in July 2016—says that if a Republican candidate for president or vice president leaves the race due to “death, declination, or otherwise” after the national convention, the Republican National Committee (RNC) has the authority to fill a vacancy by a majority vote of its 168 members or by reconvening the national convention.
If the RNC took the latter route—reconvening the national convention—the logistics and details of this are unknown, but the basic idea is that the right to fill the vacancy would be handed over to the 2,472 delegates of the national convention.
The details of what would happen if the RNC chose to fill the vacancy by a majority vote of its membership are spelled out in Rule 9. It would work like this:
For more about Rule 9, see this page.
According to Rule 8(b), the chair of the RNC must call a meeting for the purpose of filling a vacancy on the national ticket, and he or she must give a minimum of five days notice to the committee members (the minimum is ten days for other matters). Another option would be for 16 members of the RNC, "representing no fewer than sixteen (16) states," to file a petition to the RNC chairman requesting a meeting. The chairman would then have ten days from the receipt of the petition to call a meeting. The date of the meeting could be "not later than twenty (20) days or earlier than ten (10) days from the date of the call."