Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit c56b91c9 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge pull request #773 in VECTO/vecto-sim from...

Merge pull request #773 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:bugfix/VECTO-1019-error-opening-job-in-case-a-file-is-missing to ReleaseCandidates/v3.3.3.1609

* commit 'ace0857a':
  header may be missing in case of invalid file
parents 65e6d4cf ace0857a
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
protected JSONFile(JObject data, string filename, bool tolerateMissing = false)
{
var header = (JObject)data.GetEx(JsonKeys.JsonHeader);
Version = header.GetEx<string>(JsonKeys.JsonHeader_FileVersion);
Version = header[JsonKeys.JsonHeader_FileVersion] != null ? header.GetEx<string>(JsonKeys.JsonHeader_FileVersion) : string.Empty;
Body = (JObject)data.GetEx(JsonKeys.JsonBody);
_sourceFile = Path.GetFullPath(filename);
TolerateMissing = tolerateMissing;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment