Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch case where recurring item has no Start #322

Merged
merged 1 commit into from
Oct 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions net-core/Ical.Net/Ical.Net.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Ical.Net</id>
<version>3.0.12</version>
<version>3.0.13</version>
<title>Ical.Net</title>
<authors>Rian Stockbower, Douglas Day, M. David Peterson</authors>
<owners>Rian Stockbower</owners>
Expand Down Expand Up @@ -30,4 +30,4 @@
<file src="Ical.Net\bin\Release\netstandard1.3\antlr.runtime.xml" target="lib\netstandard1.3\antlr.runtime.xml" />
<file src="Ical.Net\bin\Release\netstandard1.3\Ical.Net.deps.json" target="lib\netstandard1.3\Ical.Net.deps.json" />
</files>
</package>
</package>
2 changes: 1 addition & 1 deletion net-core/Ical.Net/Ical.Net/Utility/RecurrenceUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static void ClearEvaluation(IRecurrable recurrable)
public static HashSet<Occurrence> GetOccurrences(IRecurrable recurrable, IDateTime periodStart, IDateTime periodEnd, bool includeReferenceDateInResults)
{
var evaluator = recurrable.GetService(typeof (IEvaluator)) as IEvaluator;
if (evaluator == null)
if (evaluator == null || recurrable.Start == null)
{
return new HashSet<Occurrence>();
}
Expand Down
2 changes: 2 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
A listing of what each [Nuget package](https://www.nuget.org/packages/Ical.Net) version represents.

### v3
* 3.0.13: Fix if DTSTART is not set for VTODO
* 3.0.12: Several improvements rolled up:
* `CalendarEvent` now considers Summary and Description for equality and hashing. [PR 309](https://github.com/rianjs/ical.net/pull/309).
* Protection against `InvalidOperationException`s in some collections usage scenarios [PR 312](https://github.com/rianjs/ical.net/pull/312)
Expand All @@ -20,6 +21,7 @@ A listing of what each [Nuget package](https://www.nuget.org/packages/Ical.Net)

### v2

* 2.3.4: Fix if DTSTART is not set for VTODO
* 2.3.3: Several improvements rolled up:
* `Event` now considers Summary and Description for equality and hashing. [PR 309](https://github.com/rianjs/ical.net/pull/309).
* Protection against `InvalidOperationException`s in some collections usage scenarios [PR 312](https://github.com/rianjs/ical.net/pull/312)
Expand Down
4 changes: 2 additions & 2 deletions v2/Ical.Net.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Ical.Net</id>
<version>2.3.3</version>
<version>2.3.4</version>
<title>Ical.Net</title>
<authors>Rian Stockbower, Douglas Day, M. David Peterson</authors>
<owners>Rian Stockbower</owners>
Expand Down Expand Up @@ -46,4 +46,4 @@
<file src="Ical.Net\bin\Release\net40\antlr.runtime.pdb" target="lib\net40\antlr.runtime.pdb" />
<file src="Ical.Net\bin\Release\net40\antlr.runtime.xml" target="lib\net40\antlr.runtime.xml" />
</files>
</package>
</package>
4 changes: 2 additions & 2 deletions v2/ical.NET/Utility/RecurrenceUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static HashSet<Occurrence> GetOccurrences(IRecurrable recurrable, IDateTi
public static HashSet<Occurrence> GetOccurrences(IRecurrable recurrable, IDateTime periodStart, IDateTime periodEnd, bool includeReferenceDateInResults)
{
var evaluator = recurrable.GetService(typeof (IEvaluator)) as IEvaluator;
if (evaluator == null)
if (evaluator == null || recurrable.Start == null)
{
return new HashSet<Occurrence>();
}
Expand Down Expand Up @@ -95,4 +95,4 @@ where endTime.GreaterThan(periodStart) && p.StartTime.LessThanOrEqual(periodEnd)
}
}
}
}
}