Skip to content

Commit

Permalink
fix(auth, android): fix a null pointer exception that could occur whe…
Browse files Browse the repository at this point in the history
…n removing an even listener (#10210)
  • Loading branch information
Lyokone committed Jan 5, 2023
1 parent 2fb8af4 commit 72d2e97
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -1822,7 +1822,9 @@ public Task<Void> didReinitializeFirebaseCore() {
private void removeEventListeners() {
for (EventChannel eventChannel : streamHandlers.keySet()) {
StreamHandler streamHandler = streamHandlers.get(eventChannel);
streamHandler.onCancel(null);
if (streamHandler != null) {
streamHandler.onCancel(null);
}
eventChannel.setStreamHandler(null);
}
streamHandlers.clear();
Expand Down

0 comments on commit 72d2e97

Please sign in to comment.