Added a check to make sure they are in a match before quitting. Should

fix an NPE on quit.