Fix crashes / bad errors when loading a file fails.
Merge pull request #1792 from unknownbrackets/windows-ui

Fix crashes / bad errors when loading a file fails