Commit a9ebf737 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Fix null safe check

parent 04a10cad
...@@ -36,7 +36,7 @@ class RealmMigration : RealmMigration { ...@@ -36,7 +36,7 @@ class RealmMigration : RealmMigration {
if (oldVersion == 5L) { if (oldVersion == 5L) {
val userSchema = schema.get("RealmUser") val userSchema = schema.get("RealmUser")
try { try {
userSchema!!.addField(RealmUser.NAME, String::class.java) userSchema?.addField(RealmUser.NAME, String::class.java)
} catch (e: IllegalArgumentException) { } catch (e: IllegalArgumentException) {
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
e.printStackTrace() e.printStackTrace()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment