Skip to content

Commit dc86445

Browse files
authored
fix(dynamic-links, android): null-check intent before calling getDynamicLink (#6911)
1 parent e8c2a2b commit dc86445

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/firebase_dynamic_links/android/src/main/java/io/flutter/plugins/firebasedynamiclinks/FirebaseDynamicLinksPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ private void handleGetDynamicLink(final Result result, Uri uri) {
209209
}
210210

211211
private void handleGetInitialDynamicLink(final Result result) {
212-
// If there's no activity, then there's no initial dynamic link.
213-
if (activity == null) {
212+
// If there's no activity or initial Intent, then there's no initial dynamic link.
213+
if (activity == null || activity.getIntent() == null) {
214214
result.success(null);
215215
return;
216216
}

0 commit comments

Comments
 (0)