ril: Change rild initial sequence to guarantee non-null function pointer before rild register its hidl service
am: 456df1bf43

Change-Id: I22ef08409bfcdbb052859f4aaada1f5f04a858c8
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);