diff options
author | Memphiz <memphis@machzwo.de> | 2011-10-28 19:06:37 +0200 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2011-10-28 19:06:37 +0200 |
commit | 50f7576f3597541d90ac21bf13a78c3ba7255ab0 (patch) | |
tree | 4e0ec9191176b8f0f9757f34451c56330a1c92d6 | |
parent | 5c7873adbcd129e20997b1bf22fac8d81670e969 (diff) |
[fix] - possible crash when if is down and airplay tries to fetch the mac adr...
-rw-r--r-- | xbmc/Application.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index a88e22a450..d14d5f5e34 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -1305,7 +1305,15 @@ void CApplication::StartAirplayServer() { CAirPlayServer::SetCredentials(usePassword, password); std::map<std::string, std::string> txt; - txt["deviceid"] = m_network.GetFirstConnectedInterface()->GetMacAddress(); + CNetworkInterface* iface = g_application.getNetwork().GetFirstConnectedInterface(); + if (iface) + { + txt["deviceid"] = iface->GetMacAddress(); + } + else + { + txt["deviceid"] = "FF:FF:FF:FF:FF:F2"; + } txt["features"] = "0x77"; txt["model"] = "AppleTV2,1"; txt["srcvers"] = "101.28"; |