Skip to content
This repository was archived by the owner on Jan 14, 2021. It is now read-only.

Commit b777682

Browse files
lewurmakoeplinger
authored andcommitted
[FinallyDelegate] only call it if available, on some platforms (e.g. iOS) it can be set to null (#7)
1 parent 0dc7716 commit b777682

File tree

1 file changed

+2
-2
lines changed
  • NUnitLite-1.0.0/src/framework/Internal/WorkItems

1 file changed

+2
-2
lines changed

NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ private void DispatchWork(object o)
201201
long startTicks = Stopwatch.GetTimestamp();
202202
#endif
203203

204-
finD.Set(_context, startTicks, Result);
204+
finD?.Set(_context, startTicks, Result);
205205
PerformWork();
206206
}
207207

@@ -220,7 +220,7 @@ private void DispatchWork(object o)
220220
/// </summary>
221221
protected void WorkItemComplete()
222222
{
223-
finD.Complete();
223+
finD?.Complete();
224224
_state = WorkItemState.Complete;
225225
if (Completed != null)
226226
Completed(this, EventArgs.Empty);

0 commit comments

Comments
 (0)