Index: /trunk/lib/MusicBrainz.pm
===================================================================
--- /trunk/lib/MusicBrainz.pm	(revision 44)
+++ /trunk/lib/MusicBrainz.pm	(revision 45)
@@ -110,5 +110,11 @@
     $info{LANGUAGE}            = $xpath->findvalue('text-representation/language', $release)->value;
     $info{SCRIPT}              = $xpath->findvalue('text-representation/script', $release)->value;
-    $info{BARCODE}             = $xpath->findvalue('barcode', $release)->value;
+
+    # add the barcode tag if the element exists
+    # if the barcode tag is empty, it is a release that explicitly has no barcode
+    # use the dummy value "[none]" for those cases
+    if ($xpath->exists('barcode', $release)) {
+        $info{BARCODE} = $xpath->findvalue('barcode', $release)->value || '[none]';
+    }
 
     # select the proper medium (important for multidisc releases)
