CPCib -initWithContentsOfURL: return nil if the returned data is nil (non existent URL, request failed for some reason ...)

This commit is contained in:
cacaodev committed 2012-07-27 19:17:45 +02:00
1 parent 176440eeae
commit f4904b8915
1 file changed
+4
+4
View File
@@ -61,6 +61,10 @@ var CPCibObjectDataKey = @"CPCibObjectDataKey";
if (self)
{
_data = [CPURLConnection sendSynchronousRequest:[CPURLRequest requestWithURL:aURL] returningResponse:nil];
if (!_data)
return nil;
_awakenCustomResources = YES;
}