If Main has been destroyed, both the Map and Logic objects may still be available and current, so we now reuse them instead of forcing recreation.
This resolves race conditions that could be caused by selecting and loading files into layers via the system file picker that could lead to Main being removed.
If Main has been destroyed, both the Map and Logic objects may still be available and current, so we now reuse them instead of forcing recreation.
This resolves race conditions that could be caused by selecting and loading files into layers via the system file picker that could lead to Main being removed.