diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp index 337b355..3abe559 100644 --- a/ril/libril/ril.cpp +++ b/ril/libril/ril.cpp @@ -782,9 +782,11 @@ void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, int rwlockRet = pthread_rwlock_rdlock(radioServiceRwlockPtr); assert(rwlockRet == 0); - ret = s_unsolResponses[unsolResponseIndex].responseFunction( - (int) soc_id, responseType, 0, RIL_E_SUCCESS, const_cast(data), - datalen); + if (s_unsolResponses[unsolResponseIndex].responseFunction) { + ret = s_unsolResponses[unsolResponseIndex].responseFunction( + (int) soc_id, responseType, 0, RIL_E_SUCCESS, const_cast(data), + datalen); + } rwlockRet = pthread_rwlock_unlock(radioServiceRwlockPtr); assert(rwlockRet == 0);