Code:
void main() {
object object1 = sub1();
DestroyObject(object1, 0.0, 0, 0.0);
//You may delete the code in red
object object2 = sub2();
ShowUpgradeScreen(object2);
}
Seems like it would work. Might as well delete the code I highlighted though. It's garbage now, and it might mess with the new code you put in.