crashfix for wingdi version

fixes #3464