Skip to content

Commit

Permalink
Fix crash on attempting to frame with @embed filtering.
Browse files Browse the repository at this point in the history
  • Loading branch information
sblom committed Sep 3, 2014
1 parent aa84596 commit 36bc334
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/JsonLD/Core/JsonLdApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1663,9 +1663,14 @@ private static void RemoveDependents(IDictionary<string, JsonLdApi.EmbedNode> em
, string id)
{
// get embed keys as a separate array to enable deleting keys in map
foreach (string id_dep in embeds.Keys)
List<string> embedsKeys = new List<string>(embeds.Keys);
foreach (string id_dep in embedsKeys)
{
JsonLdApi.EmbedNode e = embeds[id_dep];
JsonLdApi.EmbedNode e;
if (!embeds.TryGetValue(id_dep, out e))
{
continue;
}
JToken p = !e.parent.IsNull() ? e.parent : new JObject();
if (!(p is JObject))
{
Expand Down

0 comments on commit 36bc334

Please sign in to comment.