             if (error != nil) {
                 NSLog("Error retrieving player info: \(error.localizedDescription)")
                 self.matchStarted = false
-                self.delegate.matchEnded()
+                self.delegate?.matchEnded()
             } else {
                 for player in players {
                     NSLog("Found player: \(player.alias)")

                
                self.matchStarted = true
                GKMatchmaker.sharedMatchmaker().finishMatchmakingForMatch(self.match)
                self.delegate.matchStarted()
            }
        })
    }

    
    var presentingViewController: UIViewController!
    var match: GKMatch!
    var delegate: GCHelperDelegate?
    var playersDict = [String:AnyObject]()
    var invitedPlayer: GKPlayer!
    var invite: GKInvite!
