Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Fix bug where text is nil

  • Loading branch information...
commit 94519d644fb560e364ca49d11be4846d1c65255c 1 parent 33d6a06
@donv donv authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/gruff/base.rb
View
1  lib/gruff/base.rb
@@ -1094,6 +1094,7 @@ def calculate_caps_height(font_size)
# Not scaled since it deals with dimensions that the regular
# scaling will handle.
def calculate_width(font_size, text)
+ return 0 if text.nil?
@d.pointsize = font_size
@d.font = @font if @font
@d.get_type_metrics(@base_image, text.to_s).width
Please sign in to comment.
Something went wrong with that request. Please try again.