Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit fa937a0

Browse files
committed
No, bad dispose
1 parent b87adaf commit fa937a0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/GitHub.Api/Events/RepositoryWatcher.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,11 @@ private void Dispose(bool disposing)
331331
{
332332
disposed = true;
333333
Stop();
334-
nativeInterface.Dispose();
335-
nativeInterface = null;
334+
if (nativeInterface != null)
335+
{
336+
nativeInterface.Dispose();
337+
nativeInterface = null;
338+
}
336339
}
337340
}
338341
}

0 commit comments

Comments
 (0)