<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,10 +13,12 @@ module PdfLabelMaker
     options[:bottom_margin] + (((options[:labels_per_page] / options[:columns]) - row) * options[:label_height]) - options[:label_padding_y]
   end
 
-  def self.add_label(row, col, contact, pdf, options)
-    contact.label_lines.each_with_index do |line, idx|
-      label_text_width = options[:label_width] - (2 * options[:label_padding_x])
-      pdf.add_text_wrap(cell_x(col, options), cell_y(row, options) - (idx * options[:line_height]), label_text_width, line, options[:font_size])
+  def self.add_label(row, col, contact, pdf, options)
+    if contact
+      contact.label_lines.each_with_index do |line, idx|
+        label_text_width = options[:label_width] - (2 * options[:label_padding_x])
+        pdf.add_text_wrap(cell_x(col, options), cell_y(row, options) - (idx * options[:line_height]), label_text_width, line, options[:font_size])
+      end
     end
   end
 </diff>
      <filename>lib/pdf_label_maker.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2fd00cfe360393df494bdd4af04d4fd48294a7ef</id>
    </parent>
  </parents>
  <author>
    <name>sermoa</name>
    <email>aimee@mychores.co.uk</email>
  </author>
  <url>http://github.com/sermoa/pdf_label_maker/commit/df3e3a4b8574c08454300238afedc032db3a0622</url>
  <id>df3e3a4b8574c08454300238afedc032db3a0622</id>
  <committed-date>2008-12-12T00:26:33-08:00</committed-date>
  <authored-date>2008-12-12T00:26:33-08:00</authored-date>
  <message>Oops, apparently that check is needed. There must be an error with my array bounds somewhere.</message>
  <tree>7e8d5f9a57e2dbe321641e5dc47ef13cc3810aae</tree>
  <committer>
    <name>sermoa</name>
    <email>aimee@mychores.co.uk</email>
  </committer>
</commit>
