Commit 9ac02bdc by Sebastián Katzer

Fixes #731 Prevent crash when user info is nil

parent 38f58ac2
......@@ -571,7 +571,7 @@
{
UILocalNotification* notification = [localNotification object];
if ([notification wasUpdated])
if ([notification userInfo] == NULL || [notification wasUpdated] )
return;
NSTimeInterval timeInterval = [notification timeIntervalSinceLastTrigger];
......
......@@ -168,9 +168,12 @@ NSInteger const APPLocalNotificationTypeTriggered = 2;
[obj removeObjectForKey:@"updatedAt"];
if (obj == NULL || obj.count == 0)
return json;
data = [NSJSONSerialization dataWithJSONObject:obj
options:NSJSONWritingPrettyPrinted
error:Nil];
error:NULL];
json = [[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment