From 1f298f8e799237ec30b13dec6d267aa9e33458df Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Mon, 26 Nov 2018 16:55:23 -0800 Subject: [PATCH] Fixes potential crash when launching games --- Delta/Game Selection/GameCollectionViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Delta/Game Selection/GameCollectionViewController.swift b/Delta/Game Selection/GameCollectionViewController.swift index 73431fc..eb29445 100644 --- a/Delta/Game Selection/GameCollectionViewController.swift +++ b/Delta/Game Selection/GameCollectionViewController.swift @@ -189,8 +189,8 @@ private extension GameCollectionViewController //MARK: - Data Source func prepareDataSource() { - self.dataSource.cellConfigurationHandler = { [unowned self] (cell, item, indexPath) in - self.configure(cell as! GridCollectionViewCell, for: indexPath) + self.dataSource.cellConfigurationHandler = { [weak self] (cell, item, indexPath) in + self?.configure(cell as! GridCollectionViewCell, for: indexPath) } self.dataSource.prefetchHandler = { (game, indexPath, completionHandler) in