diff options
-rw-r--r-- | libril/ril.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libril/ril.cpp b/libril/ril.cpp index 6d375ca..23595d9 100644 --- a/libril/ril.cpp +++ b/libril/ril.cpp @@ -778,9 +778,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<void*>(data), - datalen); + if (s_unsolResponses[unsolResponseIndex].responseFunction) { + ret = s_unsolResponses[unsolResponseIndex].responseFunction( + (int) soc_id, responseType, 0, RIL_E_SUCCESS, const_cast<void*>(data), + datalen); + } rwlockRet = pthread_rwlock_unlock(radioServiceRwlockPtr); assert(rwlockRet == 0); |