Skip to content

Commit

Permalink
fix: crash on invoke virtual method onBatchComplete on a null objec…
Browse files Browse the repository at this point in the history
…t reference

Fixes wix#3397
  • Loading branch information
Yimura committed Jan 9, 2025
1 parent c2bc66c commit 369c88f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ public class RuntimeUtils {
private static final Runnable sUIUpdateClosure = new Runnable() {
@Override
public void run() {
ReactContextHolder.getContext().getNativeModule(UIManagerModule.class).onBatchComplete();
var nativeModule = ReactContextHolder.getContext().getNativeModule(UIManagerModule.class);
if (nativeModule != null) {
nativeModule.onBatchComplete();
}
}
};

Expand Down

0 comments on commit 369c88f

Please sign in to comment.