Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 75af400

Browse files
committed
completion is optional so check for nullness
1 parent d747b4a commit 75af400

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/GitHub.App/Controllers/UIController.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ void End(bool success)
151151
{
152152
uiProvider.RemoveService(typeof(IConnection));
153153
transition.OnCompleted();
154-
completion.OnNext(success);
155-
completion.OnCompleted();
154+
completion?.OnNext(success);
155+
completion?.OnCompleted();
156+
completion = null;
156157
}
157158

158159
void RunView(UIViewType viewType)
@@ -294,6 +295,7 @@ protected virtual void Dispose(bool disposing)
294295
Debug.WriteLine("Disposing ({0})", GetHashCode());
295296
disposables.Dispose();
296297
transition?.Dispose();
298+
completion?.Dispose();
297299
if (connectionAdded != null)
298300
connectionManager.Connections.CollectionChanged -= connectionAdded;
299301
connectionAdded = null;

0 commit comments

Comments
 (0)