From f234bdd3211c94f1c08e1a260aa43e5fdca54999 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 2 Feb 2016 12:03:12 +0100 Subject: [PATCH] Fix crash in IdoCheckTask::ScriptFunc refs #11014 --- lib/db_ido/idochecktask.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/db_ido/idochecktask.cpp b/lib/db_ido/idochecktask.cpp index 92c82fcc9..a2cce8172 100644 --- a/lib/db_ido/idochecktask.cpp +++ b/lib/db_ido/idochecktask.cpp @@ -92,6 +92,13 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult DbConnection::Ptr conn = static_pointer_cast(dtype->GetObject(idoName)); + if (!conn) { + cr->SetOutput("IDO connection '" + idoName + "' does not exist."); + cr->SetState(ServiceUnknown); + checkable->ProcessCheckResult(cr); + return; + } + double qps = conn->GetQueryCount(60) / 60.0; if (!conn->GetConnected()) { -- 2.40.0