Skip to content

Commit 6c00368

Browse files
fix: Add speculative fix for null object reference crash (#9671)
* Add speculative fix for null object reference crash The activity is accessed potentially unsafely, and we are seeing some null reference crashes from this file. See: #9544 * Fix null equality checks * Mark link as used before retrieving from intent * Format
1 parent 5442fc0 commit 6c00368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/firebase_dynamic_links/firebase_dynamic_links/android/src/main/java/io/flutter/plugins/firebase/dynamiclinks/FlutterFirebaseDynamicLinksPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ private Task<Map<String, Object>> getDynamicLink(
236236
taskCompletionSource.setResult(null);
237237
return;
238238
}
239-
pendingDynamicLink =
240-
Tasks.await(dynamicLinks.getDynamicLink(activity.get().getIntent()));
241239

242240
activity.get().getIntent().putExtra("flutterfire-used-link", true);
241+
pendingDynamicLink =
242+
Tasks.await(dynamicLinks.getDynamicLink(activity.get().getIntent()));
243243
}
244244

245245
taskCompletionSource.setResult(

0 commit comments

Comments
 (0)