Author: adsb
Date: 2008-11-09 17:54:17 +0000 (Sun, 09 Nov 2008)
New Revision: 1718

Modified:
   trunk/Devscripts/Debbugs.pm
   trunk/debian/changelog
Log:
Check whether get_bugs() returned a valid value before attempting to
call result() on it.

Modified: trunk/Devscripts/Debbugs.pm
===================================================================
--- trunk/Devscripts/Debbugs.pm 2008-11-09 17:40:55 UTC (rev 1717)
+++ trunk/Devscripts/Debbugs.pm 2008-11-09 17:54:17 UTC (rev 1718)
@@ -189,13 +189,18 @@
     }
     my $bugs = $soap->get_bugs(%search_parameters,
        (keys %usertags)?(usertags=>\%usertags):()
-    )->result();
+    );
+
     if (not defined $bugs) {
-       die "Error while retrieving bugs from SOAP server: $soapfault"
-       if $soapfault;
+       die "Error while retrieving bugs from SOAP server: $soapfault";
     }
 
-    return $bugs;
+    my $result = $bugs->result();
+    if (not defined $result) {
+       die "Error while retrieving bugs from SOAP server: $soapfault";
+    }
+
+    return $result;
 }
 
 sub status {

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-11-09 17:40:55 UTC (rev 1717)
+++ trunk/debian/changelog      2008-11-09 17:54:17 UTC (rev 1718)
@@ -15,6 +15,8 @@
   * Debbugs.pm:
     + Really fix the special-casing of the "archive" key in select() to
       get rid of an uninitialized value warning.
+    + Check whether get_bugs() returned a valid value before attempting to
+      call result() on it.
 
  -- Patrick Schoenfeld <[EMAIL PROTECTED]>  Thu, 06 Nov 2008 13:39:09 +0100
 



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to