fix a crash problem

If "dismissActiveNotification" method is running in background thread, "objectAtIndex:0" will crash if the array become empty after checking.