Commits

Nick Pellow committed b64dab3

CONNECT-206: Applying patch by Michael Rebsamen which prevents a crash when an error occurs while replying to an existing issue: https://connect.onjira.com/browse/CONNECT-206

  • Participants
  • Parent commits e0b0a5a

Comments (0)

Files changed (2)

File JIRAConnect/JMCClasses/Core/transport/JMCPing.m

 - (void)didReceiveComments:(NSDictionary *)comments {
     [[JMCIssueStore instance] updateWithData:comments];
     [[NSNotificationCenter defaultCenter] postNotificationName:kJMCReceivedCommentsNotification object:self];
-    
+
     // update the timestamp since we last requested comments.
     // sinceMillis is the server's time
     NSNumber *sinceMillis = [comments valueForKey:@"sinceMillis"];

File JIRAConnect/JMCClasses/Core/transport/JMCReplyDelegate.m

         comment.requestId = requestId;
         [store insertComment:comment forIssue:issueKey];
         [comment release];
-        [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:kJMCNewCommentCreated object:nil]];
+        [[NSNotificationCenter defaultCenter] performSelectorOnMainThread:@selector(postNotification:) withObject:[NSNotification notificationWithName:kJMCNewCommentCreated object:nil] waitUntilDone:NO];
     }
 }
 
         [[JMCIssueStore instance] insertComment:comment forIssue:item.originalIssueKey];
         [comment release];
         [[JMCRequestQueue sharedInstance] deleteItem:requestId];
-        [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:kJMCNewCommentCreated object:nil]];
+        [[NSNotificationCenter defaultCenter] performSelectorOnMainThread:@selector(postNotification:) withObject:[NSNotification notificationWithName:kJMCNewCommentCreated object:nil] waitUntilDone:NO];
     }