Ignore PLDM message if status objects not created

The OCC status objects are not created until after the host@0-on file
has been removed. This now delays when the objects are created.
This introduced a window where the host notified occ-control that the
OCCs were running (via PLDM) before the status objects were created
which led to a segfault.
This commit will verify the status object exists when getting the PLDM
callback.

Verified on Rainier

Change-Id: I72404d1b5d89c5259cc9f857c8087096644ef318
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/occ_manager.cpp b/occ_manager.cpp
index eb116e7..a77d49b 100644
--- a/occ_manager.cpp
+++ b/occ_manager.cpp
@@ -337,7 +337,24 @@
 
 bool Manager::updateOCCActive(instanceID instance, bool status)
 {
-    return (statusObjects[instance])->occActive(status);
+    auto obj = std::find_if(statusObjects.begin(), statusObjects.end(),
+                            [instance](const auto& obj) {
+                                return instance == obj->getOccInstanceID();
+                            });
+
+    if (obj != statusObjects.end())
+    {
+        return (*obj)->occActive(status);
+    }
+    else
+    {
+        log<level::WARNING>(
+            fmt::format(
+                "Manager::updateOCCActive: No status object to update for OCC{} (active={})",
+                instance, status)
+                .c_str());
+        return false;
+    }
 }
 
 void Manager::sbeHRESETResult(instanceID instance, bool success)