Merge "Add DISABLE_RILD_OEM_HOOK." into pi-dev
am: ac71c57c88

Change-Id: I490e1d14b7575ba8628243db67f63912dd35c24e
diff --git a/libril/ril.cpp b/libril/ril.cpp
index 514ac90..fbf7ee0 100644
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -792,9 +792,11 @@
         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);