After going nuclear, i think you havnt had to face a similar situation where you have to deal with a power vaccum.
Musharraf taking over from NS would be in the exact same league as Musharraf getting replaced by someone else. There is NO power vacuum if the leadership at the top changes. Custody of the nuclear weapons stays with the Armed Forces. There are units in charge of the weapons and that does not change if the political head of the state changes. Musharraf may not want to relinquish power, however there is no doubt in anyone's mind about his loyalty and commitment to Pakistan. He will not do something stupid to make Pakistani weapons vulnerable.
Also lets say in the worst case scenario, some Islamist comes to power, that does not mean that that Armed Forces and their higher command also go through an election. The Pakistani weapons stay intact, and at the disposal of the Pakistani government should a need ever arise Godforbid.
Perhaps this will help people realize how professionally these assets are secured (I woudl even venture to say that Pakistani custodial measures are even more comprehensive than India's):
Safety of Nuclear Weapons
Due to understandable opacity, it was not possible to evaluate directly the safety of Pakistan’s nuclear weapons. However, scientists and users are confident that a Pakistani nuclear weapon will not explode due to accidents or mishandling and is unlikely to initiate a chain reaction, even if detonated by conventional explosive. The conventional explosive of a nuclear weapon would at most spread radioactive contamination locally.
Security of Nuclear Weapons and Facilities Based on information provided by the officialdom, Pakistan is using a three-man rule, a variant of the two-man rule for security. The code to arm a weapon is divided between three people, rather than two people. For example, at an air force base the code may be divided between the base commander and the unit commander. In the army, the code may be divided between the group commander and the unit commander. This rule also applies to a launch site. The only exception is a single pilot who will receive the full code during flight; however, a single person cannot provide the full code. The Pakistani system is not as sophisticated as the U.S. Permissive Action Link (PAL) system, but it appears that attention is being given to security issues. For the U.S. and the rest of the West, one of the most troubling aspects of Pakistan’s nuclear program is inadequate physical security, which can lead to proliferation. This perception is based on two concerns. First is the belief that Pakistan does not have the systems, procedures and the technical skills to ensure the total security of its nuclear weapons, materials, and technology. The second and the more serious concern is the belief that the nuclear weapons are within reach of the religious extremists within and outside the military. For many in the Pakistani military, particularly those presently in charge of nuclear weapons, these concerns are not based on fact. It is their opinion that the possibility of nuclear weapons and technology landing in the hands of nonstate actors or some extremists within the military is almost zero.
Author: Maj Gen Mahmud Ali Durrani
Pakistan’s Strategic Thinking and the Role of Nuclear Weapons