From 8e05f6ce4bd307e651e75f026c611ad3681ea3cf Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 22 May 2014 23:01:15 +0200 Subject: [PATCH] Fix null ptr exception in Zone::GetLocalZone() Fixes #6273 --- lib/remote/zone.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/remote/zone.cpp b/lib/remote/zone.cpp index 6337744a9..c7fd93510 100644 --- a/lib/remote/zone.cpp +++ b/lib/remote/zone.cpp @@ -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(); }