diff --git a/src/net45/WampSharp/WAMP2/V2/PubSub/WampRawTopic.cs b/src/net45/WampSharp/WAMP2/V2/PubSub/WampRawTopic.cs index 7c2a39e43..597ed7f06 100644 --- a/src/net45/WampSharp/WAMP2/V2/PubSub/WampRawTopic.cs +++ b/src/net45/WampSharp/WAMP2/V2/PubSub/WampRawTopic.cs @@ -199,8 +199,11 @@ public void Unsubscribe(IUnsubscribeRequest request) public void Dispose() { - SubscriptionDisposable.Dispose(); - SubscriptionDisposable = null; + if (SubscriptionDisposable != null) + { + SubscriptionDisposable.Dispose(); + SubscriptionDisposable = null; + } } #endregion