fix compiling error on vs project.
Merge pull request #4926 from Dhilan007/develop_crash

fix compiling error on vs project.