Skip to content
Browse files

Merge pull request #7 from ecordell/master

Check for nil before calling inputStreamWithData:
  • Loading branch information...
2 parents d09e861 + bdd1246 commit 2dc82be60e01431d47b9d69ed9682db83ad6d64b Yosuke Matsuda committed Aug 3, 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 2dc82be

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