zshshr closed pull request #1465: add check for file path pointer
URL: https://github.com/apache/incubator-weex/pull/1465
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/android/sdk/libs/armeabi-v7a/libweexcore.so 
b/android/sdk/libs/armeabi-v7a/libweexcore.so
index c51218538f..e04685929b 100644
Binary files a/android/sdk/libs/armeabi-v7a/libweexcore.so and 
b/android/sdk/libs/armeabi-v7a/libweexcore.so differ
diff --git a/android/sdk/libs/armeabi/libweexcore.so 
b/android/sdk/libs/armeabi/libweexcore.so
index 56c7c60be7..d782795ca8 100644
Binary files a/android/sdk/libs/armeabi/libweexcore.so and 
b/android/sdk/libs/armeabi/libweexcore.so differ
diff --git 
a/weex_core/Source/android/jsengine/multiprocess/WeexJSConnection.cpp 
b/weex_core/Source/android/jsengine/multiprocess/WeexJSConnection.cpp
index 2be45a5a7c..ecbd7e7f32 100644
--- a/weex_core/Source/android/jsengine/multiprocess/WeexJSConnection.cpp
+++ b/weex_core/Source/android/jsengine/multiprocess/WeexJSConnection.cpp
@@ -113,21 +113,23 @@ struct WeexJSConnection::WeexJSConnectionImpl {
 
 WeexJSConnection::WeexJSConnection()
         : m_impl(new WeexJSConnectionImpl) {
-  if (checkDirOrFileIsLink(g_crashFilePath)) {
-    std::string tmp = g_crashFilePath;
-    size_t length = tmp.length();
-    char buf[length];
-    memset(buf, 0, length);
-    if (!getDirOrFileLink(g_crashFilePath, buf, length)) {
-        LOGE("getDirOrFileLink filePath(%s) error\n", g_crashFilePath);
-        g_crashFileName = g_crashFilePath;
+  if (g_crashFilePath != nullptr) {
+    if (checkDirOrFileIsLink(g_crashFilePath)) {
+        std::string tmp = g_crashFilePath;
+        size_t length = tmp.length();
+        char buf[length];
+        memset(buf, 0, length);
+        if (!getDirOrFileLink(g_crashFilePath, buf, length)) {
+            LOGE("getDirOrFileLink filePath(%s) error\n", g_crashFilePath);
+            g_crashFileName = g_crashFilePath;
+        } else {
+            g_crashFileName = buf;
+        }
     } else {
-        g_crashFileName = buf;
+        g_crashFileName = g_crashFilePath;
     }
-  } else {
-    g_crashFileName = g_crashFilePath;
+    g_crashFileName += "/crash_dump.log";
   }
-  g_crashFileName += "/crash_dump.log";
   LOGE("WeexJSConnection g_crashFileName: %s\n", g_crashFileName.c_str());
 }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to