--- loncom/interface/lonannounce.pm 2006/01/12 23:36:45 1.43 +++ loncom/interface/lonannounce.pm 2006/01/13 15:28:36 1.44 @@ -1,7 +1,7 @@ # The LearningOnline Network # Announce # -# $Id: lonannounce.pm,v 1.43 2006/01/12 23:36:45 albertel Exp $ +# $Id: lonannounce.pm,v 1.44 2006/01/13 15:28:36 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -108,13 +108,13 @@ sub readcalendar { my $map_url=$1; if (!$can_see_hidden) { my $res = $navmap->getResourceByUrl($map_url); - if ($res->randomout()) { next; } + if ($res && $res->randomout()) { next; } } $realm=&mt('Folder/Map').': '.&Apache::lonnet::gettitle($map_url); } elsif ($middle) { if (!$can_see_hidden) { my $res = $navmap->getBySymb($middle); - if ($res->randomout()) { next; } + if ($res && $res->randomout()) { next; } } $realm=&mt('Resource').': '.&Apache::lonnet::gettitle($middle); }