Added more disposed checks.

This commit is contained in:
antiduh
2014-06-30 14:49:26 +00:00
parent 0070e94aed
commit 6ed1ab5f76
3 changed files with 38 additions and 7 deletions

View File

@@ -126,12 +126,19 @@ namespace NSspi.Credentials
{
get
{
QueryNameAttribCarrier carrier = new QueryNameAttribCarrier();
SecurityStatus status = SecurityStatus.InternalError;
QueryNameAttribCarrier carrier;
SecurityStatus status;
string name = null;
bool gotRef = false;
if( this.disposed )
{
throw new ObjectDisposedException( "Credential" );
}
status = SecurityStatus.InternalError;
carrier = new QueryNameAttribCarrier();
RuntimeHelpers.PrepareConstrainedRegions();
try
{
@@ -185,6 +192,11 @@ namespace NSspi.Credentials
{
get
{
if( this.disposed )
{
throw new ObjectDisposedException( "Credential" );
}
return this.expiry;
}
}
@@ -193,6 +205,11 @@ namespace NSspi.Credentials
{
get
{
if( this.disposed )
{
throw new ObjectDisposedException( "Credential" );
}
return this.safeCredHandle;
}
}