Skip to content

Commit

Permalink
Merge pull request binford2k#70 from binford2k/fix/fix_rmagick_crasher
Browse files Browse the repository at this point in the history
Fixes the nil dereference when imagemagick is used
  • Loading branch information
casharma committed Jul 22, 2013
2 parents 0112b72 + d6ad783 commit cff9e8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/showoff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def update_image_paths(path, slide, opts={:static=>false, :pdf=>false})
if defined?(Magick)
def get_image_size(path)
if !cached_image_size.key?(path)
img = Magick::Image.ping(File.join(".", @asset_path, path)).first
img = Magick::Image.ping(path).first
# don't set a size for svgs so they can expand to fit their container
if img.mime_type == 'image/svg+xml'
cached_image_size[path] = [nil, nil]
Expand Down

0 comments on commit cff9e8d

Please sign in to comment.