Add check for the selected_service before calling GetProperties

There are two net interfaces wlan0 and eth0 for the picoimx board.
When trying to register the board to cloud through weave manger,
The weaved will have below segment fault. The root cause is after wlan0
claimed from shill, there will be only eth0 been hold in device__. And
there is no related selected_service_ been set for the eth0

00 pc 000225de  /system/bin/weaved
01 pc 0002247d  /system/bin/weaved
02 pc 00022699  /system/bin/weaved
03 pc 0005eb69  /system/lib/ (weave::privet::WifiBootstrapMa
    nager::GetCurrentlyConnectedSsid() const+8)
04 pc 000553f1  /system/lib/ (weave::privet::PrivetHandler::
    HandleInfo(base::DictionaryValue const&, weave::privet::
    UserInfo const&, base::Ca)
05 pc 00058333  /system/lib/ (weave::privet::PrivetHandler::
    HandleRequest(std::__1::basic_string<char, std::__1::char_traits<char>,

Change-Id: I9403a75fb4e4f022312b288d86332d5e5cc76f9d
diff --git a/buffet/ b/buffet/
index 8e6e1e9..afaebba 100644
--- a/buffet/
+++ b/buffet/
@@ -219,8 +219,10 @@
 std::string ShillClient::GetConnectedSsid() const {
   for (const auto& kv : devices_) {
     VariantDictionary properties;
-    if (!kv.second.selected_service->GetProperties(&properties, nullptr))
+    if (kv.second.selected_service &&
+        (!kv.second.selected_service->GetProperties(&properties, nullptr))) {
+    }
     auto property_it = properties.find(shill::kWifiHexSsid);
     if (property_it == properties.end()) continue;