summaryrefslogtreecommitdiffstats
path: root/macosx/HBPreviewViewController.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBPreviewViewController.m')
-rw-r--r--macosx/HBPreviewViewController.m9
1 files changed, 6 insertions, 3 deletions
diff --git a/macosx/HBPreviewViewController.m b/macosx/HBPreviewViewController.m
index e6bcf4cb9..c810107a8 100644
--- a/macosx/HBPreviewViewController.m
+++ b/macosx/HBPreviewViewController.m
@@ -182,9 +182,12 @@ It may be used under the terms of the GNU General Public License. */
if (self.generator && self.visible)
{
CGImageRef fPreviewImage = [self.generator copyImageAtIndex:self.selectedIndex shouldCache:YES];
- self.previewView.image = fPreviewImage;
- CFRelease(fPreviewImage);
- self.previewView.layer.opacity = 1;
+ if (fPreviewImage)
+ {
+ self.previewView.image = fPreviewImage;
+ CFRelease(fPreviewImage);
+ self.previewView.layer.opacity = 1;
+ }
}
else
{