fix gallery scan when an image cant be loaded

This commit is contained in:
Robin Appelman 2012-03-26 23:56:07 +02:00
parent 73c6db5c8e
commit eb3ec05f88
1 changed files with 1 additions and 1 deletions

View File

@ -78,8 +78,8 @@ class OC_Gallery_Scanner {
$image = OC_Gallery_Photo::getThumbnail($files[$i]);
if ($image && $image->valid()) {
imagecopyresampled($thumbnail, $image->resource(), $i*200, 0, 0, 0, 200, 200, 200, 200);
$image->destroy();
}
$image->destroy();
}
imagepng($thumbnail, OC_Config::getValue("datadirectory").'/'. OC_User::getUser() .'/gallery/' . $albumName.'.png');
imagedestroy($thumbnail);