Skip to content

Commit f55ebdb

Browse files
authored
Check runtimeExecutor before calling onMainLoopIdle (#194)
1 parent 8733225 commit f55ebdb

File tree

1 file changed

+5
-1
lines changed
  • android/src/main/java/io/csie/kudo/reactnative/v8/executor

1 file changed

+5
-1
lines changed

android/src/main/java/io/csie/kudo/reactnative/v8/executor/V8Module.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ public boolean queueIdle() {
5858
final RuntimeExecutor runtimeExecutor = getReactApplicationContext()
5959
.getCatalystInstance()
6060
.getRuntimeExecutor();
61-
V8Executor.onMainLoopIdle(runtimeExecutor);
61+
62+
if (runtimeExecutor != null) {
63+
V8Executor.onMainLoopIdle(runtimeExecutor);
64+
}
65+
6266
mLastMainLoopIdleCallbackTime = SystemClock.uptimeMillis();
6367
}
6468
return true;

0 commit comments

Comments
 (0)