diff --git a/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java b/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java index f5ac995c..386d2287 100644 --- a/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java +++ b/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java @@ -552,14 +552,16 @@ public class SignalAccount implements Closeable { final var profile = profileEntry.getProfile(); if (profile != null) { final var capabilities = new HashSet(); - if (profile.getCapabilities().gv1Migration) { - capabilities.add(Profile.Capability.gv1Migration); - } - if (profile.getCapabilities().gv2) { - capabilities.add(Profile.Capability.gv2); - } - if (profile.getCapabilities().storage) { - capabilities.add(Profile.Capability.storage); + if (profile.getCapabilities() != null) { + if (profile.getCapabilities().gv1Migration) { + capabilities.add(Profile.Capability.gv1Migration); + } + if (profile.getCapabilities().gv2) { + capabilities.add(Profile.Capability.gv2); + } + if (profile.getCapabilities().storage) { + capabilities.add(Profile.Capability.storage); + } } final var newProfile = new Profile(profileEntry.getLastUpdateTimestamp(), profile.getGivenName(),