Skip to content

Commit

Permalink
Prevent a crash on creating a thumbnail with a very high aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
Tulon committed Sep 7, 2015
1 parent aa2b983 commit 5da3b52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ThumbnailPixmapCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ ThumbnailPixmapCache::Impl::makeThumbnail(

QSize new_affine_size(orig_affine_size);
new_affine_size.scale(max_thumb_size, Qt::KeepAspectRatio);
new_affine_size = new_affine_size.expandedTo(QSize(1, 1));

// Scale down, to get a thumbnail-size dewarped image.
std::unique_ptr<AbstractImageTransform> downscaling_transform(
Expand Down

0 comments on commit 5da3b52

Please sign in to comment.