Fix null ptr exception in Zone::GetLocalZone()

Fixes #6273
This commit is contained in:
Michael Friedrich 2014-05-22 23:01:15 +02:00
parent 4df2721d4e
commit 8e05f6ce4b
1 changed files with 6 additions and 1 deletions

View File

@ -70,5 +70,10 @@ bool Zone::IsChildOf(const Zone::Ptr& zone)
Zone::Ptr Zone::GetLocalZone(void)
{
return Endpoint::GetLocalEndpoint()->GetZone();
Endpoint::Ptr local = Endpoint::GetLocalEndpoint();
if (!local)
return Zone::Ptr();
return local->GetZone();
}