[1.11 Bug] Bad selection during "add formation" causes crash

When you are in the fleet management screen, if you hit Add Formation, then select something other than a ship (say, try to press a button on the left), you no longer get to choose a ship, but the dialog is still open and you can’t click anything else. Pressing Set Target does nothing and pressing Delete Order causes the program to crash.

Other buttons that require selecting a target may have this same behavior.

This is fixed in the next patch