From a60055a9bd617d77af39098fc9c248661c559502 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Mon, 20 Oct 2014 15:36:37 -0400 Subject: [PATCH] Fixing nil for some situations --- lib/squib/graphics/text.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/squib/graphics/text.rb b/lib/squib/graphics/text.rb index b2b5062..c38b1fe 100644 --- a/lib/squib/graphics/text.rb +++ b/lib/squib/graphics/text.rb @@ -7,7 +7,7 @@ module Squib # @api private def draw_text_hint(cc,x,y,layout, color,angle) color = @deck.text_hint if color.to_s.eql? 'off' and not @deck.text_hint.to_s.eql? 'off' - return if color.to_s.eql? 'off' + return if color.to_s.eql? 'off' or color.nil? # when w,h < 0, it was never set. extents[1] are ink extents w = layout.width / Pango::SCALE w = layout.extents[1].width / Pango::SCALE if w < 0