             return
         }
         
-        delegate.match(theMatch, didReceiveData: data, fromPlayer: playerID)
+        delegate?.match(theMatch, didReceiveData: data, fromPlayer: playerID)
     }
     
     func match(theMatch: GKMatch!, player playerID: String!, didChangeState state: GKPlayerConnectionState) {

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

        
        NSLog("Match failed with error: \(error.localizedDescription)")
        matchStarted = false
        delegate?.matchEnded()
    }
    
    // MARK: GKLocalPlayerListener
