Skip to content

Commit

Permalink
Check for null on navigation activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Wiingaard committed Nov 20, 2023
1 parent 2d3a4fb commit ee96fe0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ private Options parse(@Nullable ReadableMap mergeOptions) {

protected void handle(Runnable task) {
UiThread.post(() -> {
if (getCurrentActivity() != null && !activity().isFinishing()) {
NavigationActivity activity = activity();
if (activity != null && !activity.isFinishing()) {
task.run();
}
});
Expand Down

0 comments on commit ee96fe0

Please sign in to comment.