Commit 9e6ec87e authored by Ruben Jesus Garcia Hernandez's avatar Ruben Jesus Garcia Hernandez
Browse files

If the json resource moves, we get an http status error.

Handle that gracefully
parent b0ca85c3
...@@ -458,7 +458,7 @@ int readAtomsJson (const char *const f, int **numatoms, int *timesteps, float ** ...@@ -458,7 +458,7 @@ int readAtomsJson (const char *const f, int **numatoms, int *timesteps, float **
fclose(fcells); fclose(fcells);
int total_results; int total_results;
if (json.HasMember("total_results") && json["total_results"].IsInt()) if (!json.HasParseError() && json.HasMember("total_results") && json["total_results"].IsInt())
total_results=json["total_results"].GetInt(); total_results=json["total_results"].GetInt();
else else
return -2; return -2;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment