[icinga-checkins] icinga.org: icinga2/feature/ido: Fix invalid function call.

git at icinga.org git at icinga.org
Thu Jul 11 09:03:51 CEST 2013


Module: icinga2
Branch: feature/ido
Commit: 033389d243504782769300095c4b5587439db17c
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=033389d243504782769300095c4b5587439db17c

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Jul 11 08:40:02 2013 +0200

Fix invalid function call.

---

 components/livestatus/servicestable.cpp |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/components/livestatus/servicestable.cpp b/components/livestatus/servicestable.cpp
index 69bd519..afafcfc 100644
--- a/components/livestatus/servicestable.cpp
+++ b/components/livestatus/servicestable.cpp
@@ -136,7 +136,14 @@ void ServicesTable::FetchRows(const AddRowFunction& addRowFn)
 
 Object::Ptr ServicesTable::HostAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor)
 {
-	return static_cast<Service::Ptr>(parentObjectAccessor(row))->GetHost();
+	Value service;
+
+	if (parentObjectAccessor)
+		service = parentObjectAccessor(row);
+	else
+		service = row;
+
+	return static_cast<Service::Ptr>(service)->GetHost();
 }
 
 Value ServicesTable::ShortNameAccessor(const Value& row)





More information about the icinga-checkins mailing list