Fixed crash due to index out of bound in 'loadWeapons()' if weapon type is not found.
Fixed segmentation fault. Save weapon choice(s) before deleting the dialog objects.