Commit 413b5c37 authored by Javier Abrego's avatar Javier Abrego
Browse files

Update APPLocalNotification.m

Fixed application crash due to null pointer exception when executing cancelNotification inside the procedure cancelAll.
parent a3451824
Loading
Loading
Loading
Loading
+4 −0
Changes for src/ios/APPLocalNotification.m: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -275,8 +275,12 @@
    NSString* id           = [userInfo objectForKey:@"id"];
    NSString* json         = [userInfo objectForKey:@"json"];

    if (notification==nil) {
        NSLog(@"cancelNotification: Notification equals nil");
    }else{
        [[UIApplication sharedApplication]
         cancelLocalNotification:notification];
    }

    if (fireEvent) {
        [self fireEvent:@"cancel" id:id json:json];