Commit 413b5c37 by Javier Abrego

Update APPLocalNotification.m

Fixed application crash due to null pointer exception when executing cancelNotification inside the procedure cancelAll.
parent a3451824
...@@ -275,8 +275,12 @@ ...@@ -275,8 +275,12 @@
NSString* id = [userInfo objectForKey:@"id"]; NSString* id = [userInfo objectForKey:@"id"];
NSString* json = [userInfo objectForKey:@"json"]; NSString* json = [userInfo objectForKey:@"json"];
if (notification==nil) {
NSLog(@"cancelNotification: Notification equals nil");
}else{
[[UIApplication sharedApplication] [[UIApplication sharedApplication]
cancelLocalNotification:notification]; cancelLocalNotification:notification];
}
if (fireEvent) { if (fireEvent) {
[self fireEvent:@"cancel" id:id json:json]; [self fireEvent:@"cancel" id:id json:json];
......
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