Uses a different way to check if LoadImage() failed.