diff --git a/frameworks/liteipc_linux/src/liteipc_adapter.c b/frameworks/liteipc_linux/src/liteipc_adapter.c index 3141362381e375d9007fefa8ddf2fb15556e8cea..474527d0ad5f51c68c1b9943e1c0b7f0e6b59ed9 100644 --- a/frameworks/liteipc_linux/src/liteipc_adapter.c +++ b/frameworks/liteipc_linux/src/liteipc_adapter.c @@ -398,13 +398,22 @@ static bool IsValidCB(IpcMsg* ipcMsg) static void HandleSpawnLooper(const IpcContext *context, const struct FuncPair *funcPair) { pthread_t thread; + LOG(ERROR, "enter handlespawnlooper funcpair is %p", funcPair); struct BinderThreadDesc *btd = (struct BinderThreadDesc *)malloc(sizeof(struct BinderThreadDesc)); + LOG(ERROR, "malloc finished! btd is %p", btd); if (btd == NULL) { return; } btd->context = context; - btd->func = funcPair->func; - btd->argv = funcPair->argv; + if (funcPair != NULL) { + btd->func = funcPair->func; + btd->argv = funcPair->argv; + } else { + LOG(ERROR, "funcPair is NULL!"); + btd->func = NULL; + btd->argv = NULL; + } + int ret = pthread_create(&thread, NULL, BinderThreadRoutine, btd); if (ret != 0) { free(btd);