Skip to content
Browse files

Fixes crash on initializing S3UploadInputStream with nil data.

  • Loading branch information...
1 parent d09e861 commit bdd124667ad9d99c50705ec96ce09e290b0d4f3c @ecordell ecordell committed Jul 11, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/Amazon.S3/Model/S3UploadInputStream.m
View
4 src/Amazon.S3/Model/S3UploadInputStream.m
@@ -35,7 +35,9 @@ -(id)init
+(id)inputStreamWithData:(NSData *)data
{
S3UploadInputStream *uploadStream = [[[S3UploadInputStream alloc] init] autorelease];
- [uploadStream setStream:[NSInputStream inputStreamWithData:data]];
+ if (data) {
+ [uploadStream setStream:[NSInputStream inputStreamWithData:data]];
+ }
return uploadStream;
}

0 comments on commit bdd1246

Please sign in to comment.
Something went wrong with that request. Please try again.