1.1 --- a/BLIP/BLIPRequest.m Sat May 24 17:25:06 2008 -0700
1.2 +++ b/BLIP/BLIPRequest.m Thu Jun 19 16:22:05 2008 -0700
1.3 @@ -199,6 +199,8 @@
1.4 setObj(&_mutableBody,nil);
1.5
1.6 BLIPMutableProperties *errorProps = [self.properties mutableCopy];
1.7 + if( ! errorProps )
1.8 + errorProps = [[BLIPMutableProperties alloc] init];
1.9 NSDictionary *userInfo = error.userInfo;
1.10 for( NSString *key in userInfo ) {
1.11 id value = $castIf(NSString,[userInfo objectForKey: key]);
1.12 @@ -227,8 +229,12 @@
1.13 {
1.14 Assert(_connection,@"%@ has no connection to send over",self);
1.15 Assert(!_sent,@"%@ was already sent",self);
1.16 + BLIPWriter *writer = (BLIPWriter*)_connection.writer;
1.17 + Assert(writer,@"%@'s connection has no writer (already closed?)",self);
1.18 [self _encode];
1.19 - return (self.sent = [(BLIPWriter*)_connection.writer sendMessage: self]);
1.20 + BOOL sent = self.sent = [writer sendMessage: self];
1.21 + Assert(sent);
1.22 + return sent;
1.23 }
1.24
1.25