--- a/libraries/iosrv/server/readwrite.cpp Fri Jun 25 13:06:42 2010 +0100
+++ b/libraries/iosrv/server/readwrite.cpp Thu Jul 29 12:02:58 2010 +1000
@@ -362,8 +362,13 @@
ReadEndPoint()->IorepDetach(*this);
}
- aEndPoint.IorepAttachL(*this, aMode);
iEndPoint = &aEndPoint;
+ TRAPD(err, aEndPoint.IorepAttachL(*this, aMode));
+ if (err)
+ {
+ iEndPoint = NULL;
+ User::Leave(err);
+ }
}
void CIoReadObject::SetReadMode(RIoReadHandle::TReadMode aMode)
@@ -954,8 +959,13 @@
WriteEndPoint()->IowepDetach(*this);
}
- aEndPoint.IowepAttachL(*this);
iEndPoint = &aEndPoint;
+ TRAPD(err, aEndPoint.IowepAttachL(*this));
+ if (err)
+ {
+ iEndPoint = NULL;
+ User::Leave(err);
+ }
}
void CIoWriteObject::WriteL(const RMsg& aMessage)