Commit e06c4156 authored by Tiago Cunha's avatar Tiago Cunha

Another crash

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