From bdc3fa4feaf98a7142e5af5c56d7d23b6fdeb7d0 Mon Sep 17 00:00:00 2001 From: iPel Date: Wed, 6 Sep 2023 20:13:51 +0800 Subject: [PATCH] fix(android): fix npe when preload --- .../com/tencent/mtt/hippy/bridge/HippyBridgeManagerImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/sdk/src/main/java/com/tencent/mtt/hippy/bridge/HippyBridgeManagerImpl.java b/android/sdk/src/main/java/com/tencent/mtt/hippy/bridge/HippyBridgeManagerImpl.java index 8205b391d41..a50678f49db 100644 --- a/android/sdk/src/main/java/com/tencent/mtt/hippy/bridge/HippyBridgeManagerImpl.java +++ b/android/sdk/src/main/java/com/tencent/mtt/hippy/bridge/HippyBridgeManagerImpl.java @@ -499,7 +499,9 @@ public void run() { private void notifyModuleLoaded(final ModuleLoadStatus statusCode, final String msg, final HippyRootView hippyRootView) { - mLoadModuleListener.onLoadCompletedInCurrentThread(statusCode, msg, hippyRootView); + if (mLoadModuleListener != null) { + mLoadModuleListener.onLoadCompletedInCurrentThread(statusCode, msg, hippyRootView); + } Runnable action = new Runnable() { @Override public void run() {