diff --git a/opac/opac-library.pl b/opac/opac-library.pl index 21e4142f6b..fda1956278 100755 --- a/opac/opac-library.pl +++ b/opac/opac-library.pl @@ -40,7 +40,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $found; if ($branchcode) { my $library = Koha::Libraries->find($branchcode); - if ( $library->public ) { + if ( $library && $library->public ) { $found++; $template->param( library => $library ); }