Skip to content

Commit

Permalink
Merge pull request Codeux-Software#317 from demosdemon/plist_error
Browse files Browse the repository at this point in the history
Add check for empty or nil rawData (one less error log)
  • Loading branch information
Michael Morris committed Aug 11, 2012
2 parents 84bd6f4 + e3fff1d commit 21c7dfe
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 21c7dfe

Please sign in to comment.