---
 C4/Biblio.pm |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 17796f3..9669752 100755
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -1146,6 +1146,11 @@ sub GetCOinSBiblio {
     my $record = GetMarcBiblio($biblionumber);
 
     # get the coin format
+    if ( ! $record ) {
+       # can't get a valid MARC::Record object, bail out at this point
+       warn "We called GetMarcBiblio with a biblionumber that doesn't exist 
biblionumber=$biblionumber";
+       return;
+    }
     my $pos7 = substr $record->leader(), 7, 1;
     my $pos6 = substr $record->leader(), 6, 1;
     my $mtx;
-- 
1.6.3.3

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to