Fix a bug with scaling from non-mipmaps.
authorSteinar H. Gunderson <sesse@debian.org>
Fri, 21 Mar 2008 22:59:10 +0000 (23:59 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Fri, 21 Mar 2008 22:59:10 +0000 (23:59 +0100)
perl/Sesse/pr0n/Common.pm

index 9a3d31cc34e9eecaf737315285d3b232b6346eab..3b94b592a6a543b6eb70c0670b4015711bc0199e 100644 (file)
@@ -419,7 +419,7 @@ sub make_mipmap {
 
                push @mmlist, [ $mmwidth, $mmheight ];
        }
-
+               
        # Ensure that all of them are OK
        my $last_good_mmlocation;
        for my $i (0..$#mmlist) {
@@ -461,6 +461,9 @@ sub make_mipmap {
                }
        }
 
+       if (!defined($img)) {
+               $img = read_original_image($r, $id, $dbwidth, $dbheight);
+       }
        return $img;
 }