Commit 1f004394 authored by Yusuke Iwaki's avatar Yusuke Iwaki

fix NPE

parent 1ebd23b0
......@@ -59,10 +59,12 @@ public class CurrentUserObserver extends AbstractModelObserver<User> {
// get and observe Room subscriptions.
methodCall.getRoomSubscriptions().onSuccess(task -> {
Registerable listener = new StreamNotifyUserSubscriptionsChanged(
context, hostname, realmHelper, ddpClient, userId);
listener.register();
listeners.add(listener);
if (listeners != null) {
Registerable listener = new StreamNotifyUserSubscriptionsChanged(
context, hostname, realmHelper, ddpClient, userId);
listener.register();
listeners.add(listener);
}
return null;
});
......
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