Permalink
Browse files

work with no description user.

  • Loading branch information...
1 parent 0f92a41 commit f558125020891b7c244c272df82aee8a0eb2edd4 @kou kou committed Dec 22, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 app.rb
View
8 app.rb
@@ -292,11 +292,13 @@ def render_to_surface_jigoku(surface, scale, paper, info, font)
screen_name_max_height = paper.height * 0.1
- description = prepare_jigoku_description(info[:description])
+ description = prepare_jigoku_description(info[:description] || "")
right_witticism, left_witticism, garbages = description.split(/\n\n/, 3)
max_witticism_height = paper.height - screen_name_max_height - margin * 2
- render_witticism(context, :right, right_witticism, paper,
- max_witticism_height, margin, font)
+ if right_witticism
+ render_witticism(context, :right, right_witticism, paper,
+ max_witticism_height, margin, font)
+ end
if left_witticism
render_witticism(context, :left, left_witticism, paper,
max_witticism_height, margin, font)

0 comments on commit f558125

Please sign in to comment.