fixed no json file bug

This commit is contained in:
chuanweizhang2013 2014-03-28 15:45:10 +08:00
parent 4b691cf7e9
commit c016f80f58
1 changed files with 5 additions and 2 deletions

View File

@ -410,8 +410,11 @@ void readResFile()
filecfg.append("/");
filecfg.append("fileinfo_debug.json");
FILE * pFile = fopen (filecfg.c_str() , "r");
rapidjson::FileStream inputStream(pFile);
g_filecfgjson.ParseStream<0>(inputStream);
if(pFile)
{
rapidjson::FileStream inputStream(pFile);
g_filecfgjson.ParseStream<0>(inputStream);
}
fclose(pFile);
}