Fixed a potential NullReferenceException (though I'm thinking about phasing out the method it's happening in entirely)
git-svn-id: file:///srv/devel/repo-conversion/nusu@335 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
8cc16143de
commit
207a17712e
|
@ -395,7 +395,10 @@ namespace Nuclex.Support.Threading {
|
||||||
public void ThrowIfBackgroundOperationCancelled() {
|
public void ThrowIfBackgroundOperationCancelled() {
|
||||||
IRunner currentRunner = this.currentRunner;
|
IRunner currentRunner = this.currentRunner;
|
||||||
if(currentRunner != null) {
|
if(currentRunner != null) {
|
||||||
currentRunner.CancellationTokenSource.Token.ThrowIfCancellationRequested();
|
CancellationTokenSource source = currentRunner.CancellationTokenSource;
|
||||||
|
if(source != null) {
|
||||||
|
source.Token.ThrowIfCancellationRequested();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user