Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
VR-demos
Commits
9e6ec87e
Commit
9e6ec87e
authored
May 10, 2017
by
Ruben Jesus Garcia Hernandez
Browse files
If the json resource moves, we get an http status error.
Handle that gracefully
parent
b0ca85c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
NOMADVRLib/atoms.cpp
View file @
9e6ec87e
...
...
@@ -458,7 +458,7 @@ int readAtomsJson (const char *const f, int **numatoms, int *timesteps, float **
fclose
(
fcells
);
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
();
else
return
-
2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment