Skip to content
Browse files

Check there are queued messages before trying removing last.

  • Loading branch information...
1 parent 53815fb commit 9112d00bf37f0d7e1bfa5671e4222402fe332f39 @vguerci vguerci committed Mar 10, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 MTStatusBarOverlay.m
View
3 MTStatusBarOverlay.m
@@ -627,6 +627,7 @@ - (void)showNextMessage {
if (!self.reallyHidden && [self.visibleStatusLabel.text isEqualToString:message]) {
// remove unneccesary message
@synchronized(self.messageQueue) {
+ if (self.messageQueue.count)
[self.messageQueue removeLastObject];
}
@@ -700,6 +701,7 @@ - (void)showNextMessage {
// remove the message from the queue
@synchronized(self.messageQueue) {
+ if (self.messageQueue.count)
[self.messageQueue removeLastObject];
}
@@ -722,6 +724,7 @@ - (void)showNextMessage {
// remove the message from the queue
@synchronized(self.messageQueue) {
+ if (self.messageQueue.count)
[self.messageQueue removeLastObject];
}

0 comments on commit 9112d00

Please sign in to comment.
Something went wrong with that request. Please try again.