diff --git a/NSspi/Contexts/Context.cs b/NSspi/Contexts/Context.cs index e763e26..a955a1f 100644 --- a/NSspi/Contexts/Context.cs +++ b/NSspi/Contexts/Context.cs @@ -110,6 +110,10 @@ namespace NSspi.Contexts { throw new InvalidOperationException( "The context is not fully formed." ); } + else if( this.Disposed ) + { + throw new ObjectDisposedException( "Context" ); + } sizes = QueryBufferSizes(); @@ -186,6 +190,10 @@ namespace NSspi.Contexts { throw new InvalidOperationException( "The context is not fully formed." ); } + else if( this.Disposed ) + { + throw new ObjectDisposedException( "Context" ); + } sizes = QueryBufferSizes();