Fix crash on empty database at startup.

This commit is contained in:
2022-12-27 18:39:07 +01:00
parent bdf3c0a98e
commit 30c8941bd1

View File

@@ -46,7 +46,7 @@ class GameRepository @Inject constructor(private val gameDao: GameDao, private
{ {
return withContext(Dispatchers.IO) { return withContext(Dispatchers.IO) {
val active = getActiveGame() val active = getActiveGame()
return@withContext roundDao.getAllForGame(active.uid) return@withContext roundDao.getAllForGame(active?.uid)
} }
} }