Skip to content

Commit 58edead

Browse files
author
Scott Williams
committed
don't throw on null stack
1 parent 7c74ac9 commit 58edead

File tree

1 file changed

+1
-1
lines changed
  • src/Tocsoft.DateTimeAbstractions

1 file changed

+1
-1
lines changed

src/Tocsoft.DateTimeAbstractions/Clock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ internal static IDisposable Pin(DateTimeProvider provider)
7070

7171
private static void Pop()
7272
{
73-
clockStack.Value = clockStack.Value.Pop();
73+
clockStack.Value = clockStack.Value?.Pop();
7474
}
7575

7676
private sealed class PopWhenDisposed : IDisposable

0 commit comments

Comments
 (0)