Commit e06c4156 authored by Tiago Cunha's avatar Tiago Cunha

Another crash

parent f1dd4424
...@@ -19,7 +19,7 @@ public class RealmSettings extends RealmObject { ...@@ -19,7 +19,7 @@ public class RealmSettings extends RealmObject {
public Settings asSettings() { public Settings asSettings() {
return Settings.builder() return Settings.builder()
.setId(id) .setId(id)
.setPreferences(preferences.asPreferences()) .setPreferences(preferences != null ? preferences.asPreferences() : null)
.build(); .build();
} }
......
...@@ -2,11 +2,14 @@ package chat.rocket.core.models; ...@@ -2,11 +2,14 @@ package chat.rocket.core.models;
import com.google.auto.value.AutoValue; import com.google.auto.value.AutoValue;
import javax.annotation.Nullable;
@AutoValue @AutoValue
public abstract class Settings { public abstract class Settings {
public abstract String getId(); public abstract String getId();
@Nullable
public abstract Preferences getPreferences(); public abstract Preferences getPreferences();
public static Builder builder() { public static Builder builder() {
......
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