From 88973add2fc42ce962dbeb8662b262e17ea7ca94 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 21 Jan 2009 21:12:26 +0000 Subject: [PATCH] Qualify a chained method call when getting Workflow instances. If the workflow for an instance is ever deleted, then no existing instances after that instance will ever be sent to Spectre. --- lib/WebGUI/Operation/Spectre.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebGUI/Operation/Spectre.pm b/lib/WebGUI/Operation/Spectre.pm index f33e04e19..790f850df 100644 --- a/lib/WebGUI/Operation/Spectre.pm +++ b/lib/WebGUI/Operation/Spectre.pm @@ -69,7 +69,7 @@ sub www_spectreGetSiteData { my $cookieName = $session->config->getCookieName; my @instances = (); foreach my $instance (@{WebGUI::Workflow::Instance->getAllInstances($session)}) { - next unless $instance->getWorkflow->get("enabled"); + next unless $instance->getWorkflow && $instance->getWorkflow->get("enabled"); push(@instances, { instanceId => $instance->getId, priority => $instance->get("priority"),