From 7399b69130004c102cc45d7812d284c61083b613 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Sat, 24 Feb 2007 01:27:20 +0000 Subject: [PATCH] Cope with $record not set at all (though IIRC this should never happen. But it did, and broke a looong run.) _/|_ ___________________________________________________________________ /o ) \/ Mike Taylor http://www.miketaylor.org.uk )_v__/\ He's right you know -- the lad's got a point! --- lib/ZOOM/IRSpy/Test/Record/Fetch.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ZOOM/IRSpy/Test/Record/Fetch.pm b/lib/ZOOM/IRSpy/Test/Record/Fetch.pm index fb21d18..320f9ca 100644 --- a/lib/ZOOM/IRSpy/Test/Record/Fetch.pm +++ b/lib/ZOOM/IRSpy/Test/Record/Fetch.pm @@ -1,4 +1,4 @@ -# $Id: Fetch.pm,v 1.25 2007-02-23 15:03:44 mike Exp $ +# $Id: Fetch.pm,v 1.26 2007-02-24 01:27:20 mike Exp $ # See the "Main" test package for documentation @@ -98,9 +98,9 @@ sub record { my $record = _fetch_record($rs, 0, $syn); my $ok = 0; - if ($record->error()) { + if (!$record || $record->error()) { $conn->log("irspy_test", "retrieval of $syn record failed: ", - $record->exception()); + defined $record ? $record->exception() : "???"); } else { $ok = 1; my $text = $record->render(); -- 1.7.10.4