From 4717b4549e16c1be9f19d594b4bc1c3e68f216dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sun, 9 Feb 2020 23:03:37 +0100 Subject: [PATCH] [Feedback] Fix crashing when null message is received. --- .../szczodrzynski/edziennik/data/firebase/SzkolnyAppFirebase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/firebase/SzkolnyAppFirebase.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/firebase/SzkolnyAppFirebase.kt index 1964869b..a79e2790 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/firebase/SzkolnyAppFirebase.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/firebase/SzkolnyAppFirebase.kt @@ -47,7 +47,7 @@ class SzkolnyAppFirebase(val app: App, val profiles: List, val message: ) "appUpdate" -> launch { UpdateWorker.runNow(app, app.gson.fromJson(message.data.getString("update"), Update::class.java)) } "feedbackMessage" -> launch { - val message = app.gson.fromJson(message.data.getString("message"), FeedbackMessage::class.java) + val message = app.gson.fromJson(message.data.getString("message"), FeedbackMessage::class.java) ?: return@launch feedbackMessage(message) } }