Skip to content

Commit

Permalink
Check disposable isn't null before disposing it
Browse files Browse the repository at this point in the history
  • Loading branch information
Elad Zelingher committed Aug 24, 2015
1 parent 4a13d85 commit 085fe68
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/net45/WampSharp/WAMP2/V2/PubSub/WampRawTopic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,11 @@ public void Unsubscribe(IUnsubscribeRequest<TMessage> request)

public void Dispose()
{
SubscriptionDisposable.Dispose();
SubscriptionDisposable = null;
if (SubscriptionDisposable != null)
{
SubscriptionDisposable.Dispose();
SubscriptionDisposable = null;
}
}

#endregion
Expand Down

0 comments on commit 085fe68

Please sign in to comment.