Fix NULL pointer deref in Windows frontend