Fix #1484 (crash on windows in release mode).