Skip to content

Commit

Permalink
Add check for empty or nil rawData (one less error log)
Browse files Browse the repository at this point in the history
  • Loading branch information
demosdemon committed Aug 10, 2012
1 parent 5308f58 commit e3fff1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Library/TLOFileLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ - (NSDictionary *)propertyList /* @private */
{
if (self.writePlainText == NO) {
NSData *rawData = [_NSFileManager() contentsAtPath:self.filename];

if (PointerIsEmpty(rawData) || rawData.length == 0)
return [NSDictionary dictionary];

NSString *readError;

NSDictionary *plist = [NSPropertyListSerialization propertyListFromData:rawData
Expand Down

0 comments on commit e3fff1d

Please sign in to comment.