This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new 70b2e9c  [fix] fix npe in core_side_platform refresh an eagle instance
     new 6466d70  Merge pull request #2965 from 
hpop1994/feature/fix_refresh_instance_npe_in_coresideplatform
70b2e9c is described below

commit 70b2e9cd080a9d24cca95df34bd01e26ff8b2524
Author: xujc <[email protected]>
AuthorDate: Tue Oct 15 16:47:26 2019 +0800

    [fix] fix npe in core_side_platform refresh an eagle instance
---
 weex_core/Source/core/bridge/platform/core_side_in_platform.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/weex_core/Source/core/bridge/platform/core_side_in_platform.cpp 
b/weex_core/Source/core/bridge/platform/core_side_in_platform.cpp
index 34d1e49..d3e2736 100644
--- a/weex_core/Source/core/bridge/platform/core_side_in_platform.cpp
+++ b/weex_core/Source/core/bridge/platform/core_side_in_platform.cpp
@@ -395,8 +395,11 @@ int CoreSideInPlatform::RefreshInstance(
     args->value.string = genWeexString(
         reinterpret_cast<const uint16_t*>(utf16_key.c_str()), 
utf16_key.size());
     msg.push_back(args);
-
-    
WeexCore::WeexCoreManager::Instance()->script_bridge()->script_side()->ExecJS(
+    ScriptBridge* bridge = 
WeexCore::WeexCoreManager::Instance()->script_bridge();
+    if (!bridge){
+      return false;
+    }
+    bridge->script_side()->ExecJS(
         instanceId, "", "callJS", msg);
     freeParams(msg);
     return true;

Reply via email to