Ignore nested interface is nullptr.

If a function call returns a pointer to a HIDL proxy and that pointer is
nullptr, ignore do not register it as an opened interface.

Test: SANITIZE_TARGET="address coverage" make vts -j64 && vts-tradefed
run commandAndExit vts --skip-all-system-status-check --primary-abi-only
--skip-preconditions -l VERBOSE --module
VtsHalAudioEffectV2_0IfaceFuzzer
Merged-In: I392618ae624b0d450104416dba366b2aefb348e0
Change-Id: I392618ae624b0d450104416dba366b2aefb348e0

(cherry picked from commit d4168dc56e524668218c04a079ee7a800a8368bd)
diff --git a/iface_fuzzer/ProtoFuzzerRunner.cpp b/iface_fuzzer/ProtoFuzzerRunner.cpp
index 3f3422f..7c9ea84 100644
--- a/iface_fuzzer/ProtoFuzzerRunner.cpp
+++ b/iface_fuzzer/ProtoFuzzerRunner.cpp
@@ -201,7 +201,10 @@
 
 void ProtoFuzzerRunner::ProcessReturnValue(const FuncSpec &result) {
   for (const auto &var : result.return_type_hidl()) {
-    if (var.has_hidl_interface_pointer() && var.has_predefined_type()) {
+    // If result contains a pointer to an interface, register it in
+    // opened_ifaces_ table. That pointer must not be a nullptr.
+    if (var.has_hidl_interface_pointer() && var.hidl_interface_pointer() &&
+        var.has_predefined_type()) {
       uint64_t hidl_service = var.hidl_interface_pointer();
       string type = var.predefined_type();
       string iface_name = StripNamespace(type);