Fix parsing gpio config format issue

A recent change was submitted regarding addition of
new gpio config format to support group gpio config and
respective config parser change. This change caused
app crash for platforms using previous config format.

This is resolved with this fix by adding parser support for
both config formats.

Signed-off-by: Naveen Moses <naveen.mosess@hcl.com>
Change-Id: I891f22515cacc001e4b4690003849a05148c86c2
diff --git a/inc/button_factory.hpp b/inc/button_factory.hpp
index 81c8e47..1c513ef 100644
--- a/inc/button_factory.hpp
+++ b/inc/button_factory.hpp
@@ -54,8 +54,15 @@
     {
 
         // find matching name in the registry and call factory method.
-
-        return buttonIfaceRegistry.at(name)(bus, event, buttonCfg);
+        auto objectIter = buttonIfaceRegistry.find(name);
+        if (objectIter != buttonIfaceRegistry.end())
+        {
+            return objectIter->second(bus, event, buttonCfg);
+        }
+        else
+        {
+            return nullptr;
+        }
     }
 
   private: