[win32] Prevent crash on startup
Merge pull request #2687 from Karlson2k/prevent_crash_01

[win32] Prevent crash on startup