Skip to content

Commit

Permalink
Merge #2549 Fix null ref exception when repo has empty ckan file
Browse files Browse the repository at this point in the history
  • Loading branch information
Olympic1 committed Oct 28, 2018
2 parents e3648d9 + bdc2f76 commit 5b54850
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ All notable changes to this project will be documented in this file.
- [Core] Don't throw exceptions when resetting cache dir (#2547 by: HebaruSan; reviewed: politas)
- [GUI] Fix crash at startup on Windows risen in #2536 (#2557 by: HebaruSan; reviewed: Olympic1)
- [Core] Allow game version of "any" with a vref (#2553 by: HebaruSan; reviewed: Olympic1)
- [Core] Fix null ref exception when repo has empty ckan file (#2549 by: HebaruSan; reviewed: Olympic1)

## v1.25.3 (Woomera)

Expand Down
6 changes: 5 additions & 1 deletion Core/Net/Repo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,11 @@ private static CkanModule ProcessRegistryMetadataFromJSON(string metadata, strin
try
{
CkanModule module = CkanModule.FromJson(metadata);
log.DebugFormat("Found {0} version {1}", module.identifier, module.version);
// FromJson can return null for the empty string
if (module != null)
{
log.DebugFormat("Found {0} version {1}", module.identifier, module.version);
}
return module;
}
catch (Exception exception)
Expand Down

0 comments on commit 5b54850

Please sign in to comment.